@@ -2,6 +2,7 @@ package tfe
2
2
3
3
import (
4
4
"context"
5
+ "os"
5
6
"testing"
6
7
7
8
"github.com/stretchr/testify/assert"
@@ -12,13 +13,17 @@ import (
12
13
// To run them locally, follow the instructions outlined in hyok_configuration_integration_test.go
13
14
14
15
func TestAzureOIDCConfigurationCreateDelete (t * testing.T ) {
15
- if skipHYOKIntegrationTests {
16
- t .Skip ()
17
- }
16
+ skipHYOKIntegrationTests (t )
18
17
19
18
client := testClient (t )
20
19
ctx := context .Background ()
21
20
21
+ // replace the environment variable with a valid organization name that has Azure OIDC HYOK configurations
22
+ hyokOrganizationName := os .Getenv ("HYOK_ORGANIZATION_NAME" )
23
+ if hyokOrganizationName == "" {
24
+ t .Fatal ("Export a valid HYOK_ORGANIZATION_NAME before running this test!" )
25
+ }
26
+
22
27
orgTest , err := client .Organizations .Read (ctx , hyokOrganizationName )
23
28
if err != nil {
24
29
t .Fatal (err )
@@ -75,13 +80,17 @@ func TestAzureOIDCConfigurationCreateDelete(t *testing.T) {
75
80
}
76
81
77
82
func TestAzureOIDCConfigurationRead (t * testing.T ) {
78
- if skipHYOKIntegrationTests {
79
- t .Skip ()
80
- }
83
+ skipHYOKIntegrationTests (t )
81
84
82
85
client := testClient (t )
83
86
ctx := context .Background ()
84
87
88
+ // replace the environment variable with a valid organization name that has Azure OIDC HYOK configurations
89
+ hyokOrganizationName := os .Getenv ("HYOK_ORGANIZATION_NAME" )
90
+ if hyokOrganizationName == "" {
91
+ t .Fatal ("Export a valid HYOK_ORGANIZATION_NAME before running this test!" )
92
+ }
93
+
85
94
orgTest , err := client .Organizations .Read (ctx , hyokOrganizationName )
86
95
if err != nil {
87
96
t .Fatal (err )
@@ -103,13 +112,17 @@ func TestAzureOIDCConfigurationRead(t *testing.T) {
103
112
}
104
113
105
114
func TestAzureOIDCConfigurationUpdate (t * testing.T ) {
106
- if skipHYOKIntegrationTests {
107
- t .Skip ()
108
- }
115
+ skipHYOKIntegrationTests (t )
109
116
110
117
client := testClient (t )
111
118
ctx := context .Background ()
112
119
120
+ // replace the environment variable with a valid organization name that has Azure OIDC HYOK configurations
121
+ hyokOrganizationName := os .Getenv ("HYOK_ORGANIZATION_NAME" )
122
+ if hyokOrganizationName == "" {
123
+ t .Fatal ("Export a valid HYOK_ORGANIZATION_NAME before running this test!" )
124
+ }
125
+
113
126
orgTest , err := client .Organizations .Read (ctx , hyokOrganizationName )
114
127
if err != nil {
115
128
t .Fatal (err )
0 commit comments