Skip to content

Commit f742cfe

Browse files
committed
skip tags tests unless beta
1 parent acb6905 commit f742cfe

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

projects_integration_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ func TestProjectsList(t *testing.T) {
6464
})
6565

6666
t.Run("when using a tags filter", func(t *testing.T) {
67+
skipUnlessBeta(t)
68+
6769
p1, wTestCleanup1 := createProjectWithOptions(t, client, orgTest, ProjectCreateOptions{
6870
Name: randomStringWithoutSpecialChar(t),
6971
TagBindings: []*TagBinding{
@@ -217,12 +219,14 @@ func TestProjectsUpdate(t *testing.T) {
217219
assert.NotEqual(t, kBefore.Name, kAfter.Name)
218220
assert.NotEqual(t, kBefore.Description, kAfter.Description)
219221

220-
bindings, err := client.Projects.ListTagBindings(ctx, kAfter.ID)
221-
require.NoError(t, err)
222+
if betaFeaturesEnabled() {
223+
bindings, err := client.Projects.ListTagBindings(ctx, kAfter.ID)
224+
require.NoError(t, err)
222225

223-
assert.Len(t, bindings, 1)
224-
assert.Equal(t, "foo", bindings[0].Key)
225-
assert.Equal(t, "bar", bindings[0].Value)
226+
assert.Len(t, bindings, 1)
227+
assert.Equal(t, "foo", bindings[0].Key)
228+
assert.Equal(t, "bar", bindings[0].Value)
229+
}
226230
})
227231

228232
t.Run("when updating with invalid name", func(t *testing.T) {

workspace_integration_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ func TestWorkspacesList(t *testing.T) {
251251
})
252252

253253
t.Run("when using a tags filter", func(t *testing.T) {
254+
skipUnlessBeta(t)
255+
254256
w1, wTestCleanup1 := createWorkspaceWithOptions(t, client, orgTest, WorkspaceCreateOptions{
255257
Name: String(randomString(t)),
256258
TagBindings: []*TagBinding{
@@ -1300,12 +1302,14 @@ func TestWorkspacesUpdate(t *testing.T) {
13001302
assert.Equal(t, *options.WorkingDirectory, item.WorkingDirectory)
13011303
}
13021304

1303-
bindings, err := client.Workspaces.ListTagBindings(ctx, wTest.ID)
1304-
require.NoError(t, err)
1305+
if betaFeaturesEnabled() {
1306+
bindings, err := client.Workspaces.ListTagBindings(ctx, wTest.ID)
1307+
require.NoError(t, err)
13051308

1306-
assert.Len(t, bindings, 1)
1307-
assert.Equal(t, "foo", bindings[0].Key)
1308-
assert.Equal(t, "bar", bindings[0].Value)
1309+
assert.Len(t, bindings, 1)
1310+
assert.Equal(t, "foo", bindings[0].Key)
1311+
assert.Equal(t, "bar", bindings[0].Value)
1312+
}
13091313
})
13101314

13111315
t.Run("when options includes both an operations value and an enforcement mode value", func(t *testing.T) {

0 commit comments

Comments
 (0)