From d9a19b32747a9733bde6dde2dd36916df2c11388 Mon Sep 17 00:00:00 2001 From: mikameyer Date: Wed, 3 Nov 2021 14:41:20 +0100 Subject: [PATCH 1/3] integration tests: switched fixed ips to container names --- test/create_testdata/main.go | 2 +- test/device_test_data.go | 2 +- test/integration_test.go | 6 +++--- test/testdata/docker-compose.yml | 17 +---------------- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/test/create_testdata/main.go b/test/create_testdata/main.go index a6fb72a..ee71054 100644 --- a/test/create_testdata/main.go +++ b/test/create_testdata/main.go @@ -177,7 +177,7 @@ func getDeviceTestData(device string) (test.DeviceTestData, error) { baseRequest := request.BaseRequest{ DeviceData: request.DeviceData{ - IPAddress: "172.20.0.8", + IPAddress: "snmpsim1", ConnectionData: connectionData, }, } diff --git a/test/device_test_data.go b/test/device_test_data.go index e8627ef..6d954e8 100644 --- a/test/device_test_data.go +++ b/test/device_test_data.go @@ -173,7 +173,7 @@ func WaitForSNMPSim(community string, port int) error { r := request.IdentifyRequest{ BaseRequest: request.BaseRequest{ DeviceData: request.DeviceData{ - IPAddress: "172.20.0.8", + IPAddress: "snmpsim1", ConnectionData: network.ConnectionData{ SNMP: &network.SNMPConnectionData{ Communities: []string{community}, diff --git a/test/integration_test.go b/test/integration_test.go index f8561e3..8461574 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -90,9 +90,9 @@ func init() { log.Fatal().Err(err).Msg("failed to unmarshal test config!") } - snmpSimIPs = make(chan string, 3) - snmpSimIPs <- "172.20.0.8" - snmpSimIPs <- "172.20.0.9" + snmpSimIPs = make(chan string, 2) + snmpSimIPs <- "snmpsim1" + snmpSimIPs <- "snmpsim2" } func TestIntegration(t *testing.T) { diff --git a/test/testdata/docker-compose.yml b/test/testdata/docker-compose.yml index 0553e7f..758c025 100644 --- a/test/testdata/docker-compose.yml +++ b/test/testdata/docker-compose.yml @@ -9,26 +9,11 @@ services: depends_on: - snmpsim1 - snmpsim2 - networks: - tholanetwork: - ipv4_address: 172.20.0.7 snmpsim1: image: thola/snmpsim:latest volumes: - ${THOLA_TEST_SNMPRECDIR}:/usr/local/snmpsim/data/ - networks: - tholanetwork: - ipv4_address: 172.20.0.8 snmpsim2: image: thola/snmpsim:latest volumes: - - ${THOLA_TEST_SNMPRECDIR}:/usr/local/snmpsim/data/ - networks: - tholanetwork: - ipv4_address: 172.20.0.9 - -networks: - tholanetwork: - ipam: - config: - - subnet: 172.20.0.0/24 \ No newline at end of file + - ${THOLA_TEST_SNMPRECDIR}:/usr/local/snmpsim/data/ \ No newline at end of file From 1c81f49d227a1239b3c33ee24327dd99b9b6e00b Mon Sep 17 00:00:00 2001 From: mikameyer Date: Wed, 3 Nov 2021 14:43:16 +0100 Subject: [PATCH 2/3] release workflow: removed hardcoded ghcr name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f35fd24..0d3f944 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: id: meta uses: docker/metadata-action@v3 with: - images: ghcr.io/inexio/thola + images: ghcr.io/${{ github.repository }} tags: type=semver,pattern={{version}} - name: Login to GitHub Container Registry From 017d65fb584c313126ed6057f3aa68e918f84685 Mon Sep 17 00:00:00 2001 From: mikameyer Date: Wed, 3 Nov 2021 14:45:35 +0100 Subject: [PATCH 3/3] bump version --- doc/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/doc.go b/doc/doc.go index eb9851d..7818a6b 100644 --- a/doc/doc.go +++ b/doc/doc.go @@ -28,4 +28,4 @@ package doc // Version specifies the current version. -const Version = "v0.5.1" +const Version = "v0.5.2"