Skip to content

Commit ba4a587

Browse files
chmouelzakisk
authored andcommitted
fix: Re-enable tests for Global config changes
Previously, tests that modified the global config were skipped due to flakiness. However, the flakes were unrelated, and other tests also modify the global config. Let's re-enable these tests and try them on. Co-authored-by: Gemini Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
1 parent c5d07bb commit ba4a587

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

test/gitea_access_control_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ func TestGiteaACLCommentsAllowing(t *testing.T) {
270270
// the status of CI shows as success. Now non authorized user pushes to PR, the CI will again go to pending
271271
// and require /ok-to-test again from authorized user.
272272
func TestGiteaACLCommentsAllowingRememberOkToTestFalse(t *testing.T) {
273-
t.Skip("Skipping test changing the global config map for now")
274-
275273
ctx := context.Background()
276274
topts := &tgitea.TestOpts{
277275
TargetEvent: triggertype.PullRequest.String(),

test/gitea_params_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ func TestGiteaParamsStandardCheckForPushAndPullEvent(t *testing.T) {
7979
}
8080

8181
func TestGiteaParamsOnRepoCRWithCustomConsole(t *testing.T) {
82-
t.Skip("Skipping test changing the global config map for now")
8382
ctx := context.Background()
8483
topts := &tgitea.TestOpts{
8584
CheckForStatus: "success",

test/github_scope_token_to_list_of_private_public_repos_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func TestGithubPullRequestScopeTokenToListOfRepos(t *testing.T) {
5555
}
5656

5757
func TestGithubPullRequestScopeTokenToListOfReposByGlobalConfiguration(t *testing.T) {
58-
t.Skip("Skipping test changing the global config map for now")
5958
if os.Getenv("NIGHTLY_E2E_TEST") != "true" {
6059
t.Skip("Skipping test since only enabled for nightly")
6160
}
@@ -183,6 +182,7 @@ func verifyGHTokenScope(t *testing.T, remoteTaskURL, remoteTaskName string, data
183182
runcnx.Clients.Log.Infof("Check if we have the repository set as succeeded")
184183
repo, err := runcnx.Clients.PipelineAsCode.PipelinesascodeV1alpha1().Repositories(targetNS).Get(ctx, targetNS, metav1.GetOptions{})
185184
assert.NilError(t, err)
185+
assert.Assert(t, len(repo.Status) > 0, "Repository status is empty, no status found")
186186
laststatus := repo.Status[len(repo.Status)-1]
187187
assert.Equal(t, corev1.ConditionTrue, laststatus.Conditions[0].Status)
188188
assert.Equal(t, sha, *laststatus.SHA)

0 commit comments

Comments
 (0)