Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
weilueluo committed Sep 22, 2023
1 parent e5988e2 commit c09b6e1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 34 deletions.
6 changes: 1 addition & 5 deletions provider/.github-action.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ IOS_RESOURCE_IGNORE_CERTIFICATE=true
IOS_RESOURCE_HOST=10.10.0.198
IOS_RESOURCE_PORT=22
IOS_RESOURCE_NEW_NAME=test-ios-device-2
IOS_DATA_SOURCE_ID=cd0483d0-5ec5-4d8e-b92d-8eb389f88417
IOS_DATA_SOURCE_NAME=weilue-test-ios
IOS_DATA_SOURCE_SOCKET_ADDRESS=10.10.0.198:22
IOS_DATA_SOURCE_HOST=10.10.0.198
IOS_DATA_SOURCE_PORT=22
IOS_DATA_SOURCE_IGNORE_CERTIFICATE=false
FTD_RESOURCE_NAME=test-cloud-ftd-12345
FTD_RESOURCE_ACCESS_POLICY_NAME=Default Access Control Policy
Expand Down Expand Up @@ -58,7 +54,7 @@ ASA_DATA_SOURCE_NAME=asa-data-source
ASA_DATA_SOURCE_SOCKET_ADDRESS=52.53.230.145:443
ASA_DATA_SOURCE_HOST=52.53.230.145
ASA_DATA_SOURCE_PORT=443
ASA_DATA_SOURCE_IGNORE_CERTIFICATE=false
ASA_DATA_SOURCE_IGNORE_CERTIFICATE=true
CONNECTOR_DATA_SOURCE_NAME=CDO_terraform-provider-cdo-SDC-1
CONNECTOR_RESOURCE_NAME=test-sdc-1
CONNECTOR_RESOURCE_NEW_NAME=test-sdc-2
Expand Down
16 changes: 0 additions & 16 deletions provider/internal/acctest/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,10 @@ func (e *env) IosResourceNewName() string {
return e.mustGetString("IOS_RESOURCE_NEW_NAME")
}

func (e *env) IosDataSourceId() string {
return e.mustGetString("IOS_DATA_SOURCE_ID")
}

func (e *env) IosDataSourceName() string {
return e.mustGetString("IOS_DATA_SOURCE_NAME")
}

func (e *env) IosDataSourceSocketAddress() string {
return e.mustGetString("IOS_DATA_SOURCE_SOCKET_ADDRESS")
}

func (e *env) IosDataSourceHost() string {
return e.mustGetString("IOS_DATA_SOURCE_HOST")
}

func (e *env) IosDataSourcePort() int64 {
return e.mustGetInt("IOS_DATA_SOURCE_PORT")
}

func (e *env) IosDataSourceIgnoreCertificate() string {
return e.mustGetString("IOS_DATA_SOURCE_IGNORE_CERTIFICATE")
}
Expand Down
13 changes: 0 additions & 13 deletions provider/internal/device/ios/data_source_test.go
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
package ios_test

import (
"strconv"
"testing"

"github.com/CiscoDevnet/terraform-provider-cdo/internal/acctest"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)

var testIosDataSource = struct {
Id string
Name string
SocketAddress string
Host string
Port int64
IgnoreCertificate string
}{
Id: acctest.Env.IosDataSourceId(),
Name: acctest.Env.IosDataSourceName(),
SocketAddress: acctest.Env.IosDataSourceSocketAddress(),
Host: acctest.Env.IosDataSourceHost(),
Port: acctest.Env.IosDataSourcePort(),
IgnoreCertificate: acctest.Env.IosDataSourceIgnoreCertificate(),
}

Expand All @@ -39,11 +30,7 @@ func TestAccIosDeviceDataSource(t *testing.T) {
{
Config: acctest.ProviderConfig() + testIosDataSourceConfig,
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.cdo_ios_device.test", "id", testIosDataSource.Id),
resource.TestCheckResourceAttr("data.cdo_ios_device.test", "name", testIosDataSource.Name),
resource.TestCheckResourceAttr("data.cdo_ios_device.test", "socket_address", testIosDataSource.SocketAddress),
resource.TestCheckResourceAttr("data.cdo_ios_device.test", "host", testIosDataSource.Host),
resource.TestCheckResourceAttr("data.cdo_ios_device.test", "port", strconv.FormatInt(testIosDataSource.Port, 10)),
resource.TestCheckResourceAttr("data.cdo_ios_device.test", "ignore_certificate", testIosDataSource.IgnoreCertificate),
),
},
Expand Down

0 comments on commit c09b6e1

Please sign in to comment.