Skip to content

Commit 9cea527

Browse files
chandrasekarsrinsahilg11
authored andcommitted
fix devops build service create buildRun test
1 parent 867f806 commit 9cea527

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

internal/integrationtest/devops_build_run_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ var (
6767
BuildRunResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_devops_build_pipeline", "test_build_pipeline", acctest.Required, acctest.Create, buildPipelineRepresentation) +
6868
acctest.GenerateResourceFromRepresentationMap("oci_devops_project", "test_project", acctest.Required, acctest.Create, devopsProjectRepresentation) +
6969
DefinedTagsDependencies +
70+
acctest.GenerateResourceFromRepresentationMap("oci_logging_log_group", "test_devops_log_group", acctest.Required, acctest.Create, devopsLogGroupRepresentation) +
71+
acctest.GenerateResourceFromRepresentationMap("oci_logging_log", "test_log", acctest.Optional, acctest.Create, deployLogRepresentation) +
7072
acctest.GenerateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", acctest.Required, acctest.Create, notificationTopicRepresentation)
7173
)
7274

internal/integrationtest/devops_connection_gitlab_test.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ var (
3030
}
3131

3232
devopsGitlabConnectionDataSourceRepresentation = map[string]interface{}{
33-
"compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`},
34-
"connection_type": acctest.Representation{RepType: acctest.Optional, Create: `GitlabAccessToken`},
35-
"display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`},
36-
"id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_connection.test_connection.id}`},
37-
"project_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_project.test_project.id}`},
38-
"state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`},
39-
"filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: devopsGitlabConnectionDataSourceFilterRepresentation}}
33+
"compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`},
34+
"display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`},
35+
"id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_connection.test_connection.id}`},
36+
"project_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_project.test_project.id}`},
37+
"state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`},
38+
"filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: devopsGitlabConnectionDataSourceFilterRepresentation}}
4039
devopsGitlabConnectionDataSourceFilterRepresentation = map[string]interface{}{
4140
"name": acctest.Representation{RepType: acctest.Required, Create: `id`},
4241
"values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_devops_connection.test_connection.id}`}},
@@ -157,7 +156,6 @@ func TestDevopsGitlabConnectionResource_basic(t *testing.T) {
157156
acctest.GenerateResourceFromRepresentationMap("oci_devops_connection", "test_connection", acctest.Optional, acctest.Update, devopsGitlabConnectionRepresentation),
158157
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
159158
resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId),
160-
resource.TestCheckResourceAttr(datasourceName, "connection_type", "GitlabAccessToken"), //TODO: Needs to accept `GITLAB_ACCESS_TOKEN`
161159
resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"),
162160
resource.TestCheckResourceAttrSet(datasourceName, "id"),
163161
resource.TestCheckResourceAttrSet(datasourceName, "project_id"),

internal/integrationtest/devops_connection_test.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ var (
3232
}
3333

3434
devopsConnectionDataSourceRepresentation = map[string]interface{}{
35-
"compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`},
36-
"connection_type": acctest.Representation{RepType: acctest.Optional, Create: `GithubAccessToken`},
37-
"display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`},
38-
"id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_connection.test_connection.id}`},
39-
"project_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_project.test_project.id}`},
40-
"state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`},
41-
"filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: devopsConnectionDataSourceFilterRepresentation}}
35+
"compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`},
36+
"display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`},
37+
"id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_connection.test_connection.id}`},
38+
"project_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_devops_project.test_project.id}`},
39+
"state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`},
40+
"filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: devopsConnectionDataSourceFilterRepresentation}}
4241
devopsConnectionDataSourceFilterRepresentation = map[string]interface{}{
4342
"name": acctest.Representation{RepType: acctest.Required, Create: `id`},
4443
"values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_devops_connection.test_connection.id}`}},
@@ -159,7 +158,6 @@ func TestDevopsConnectionResource_basic(t *testing.T) {
159158
acctest.GenerateResourceFromRepresentationMap("oci_devops_connection", "test_connection", acctest.Optional, acctest.Update, devopsConnectionRepresentation),
160159
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
161160
resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId),
162-
resource.TestCheckResourceAttr(datasourceName, "connection_type", "GithubAccessToken"), //TODO: Needs to accept `GITHUB_ACCESS_TOKEN`
163161
resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"),
164162
resource.TestCheckResourceAttrSet(datasourceName, "id"),
165163
resource.TestCheckResourceAttrSet(datasourceName, "project_id"),

0 commit comments

Comments
 (0)