Hello there. I'm running into issues where the test suite for this project intermittently fails with some errors. I ran the tests in a loop a loop and at times the following happens:
I'm including the output of the test runs here. For context, I've been trying to carve some time to continue working on a PR to add support for #5 and and have the functionality working but wanted to write some tests which requires me to understand the pritunl provider test framework. I started running the tests on my branch and ran into problems so I tried to run them on the mainline master with latest and the same problems exist.
commit c4e3ed54caf9d7ebde5c87172e9c636f2e1e46a6 (HEAD, original/master)
Merge: fcf711c ad73d46
Author: Alexandr Hacicheant <[email protected]>
Date: Tue Nov 2 23:40:11 2021 +0200
Merge pull request #11 from disc/server-attributes-reordering-on-import
Fixed some server's attribute value reordering during importing stage
Happy to help if I can to troubleshoot. Let me know if you need more information.
I'm running tests on a mac pro. Using go version 1.16.3.
❯ for i in 1 2 3 4 5 6 7 8 9 10; do make test; done
tf_pritunl_acc_test
ccc7ac955beeb649934047611cab1358a835c8b1bcdf50990893b984a5a463c9
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
resource_server_test.go:14: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_basic (39.78s)
=== RUN TestGetServer_with_attached_organization
--- PASS: TestGetServer_with_attached_organization (58.49s)
=== RUN TestGetServer_with_a_few_attached_organizations
resource_server_test.go:102: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_with_a_few_attached_organizations (52.63s)
=== RUN TestGetServer_with_attached_route
--- PASS: TestGetServer_with_attached_route (50.78s)
=== RUN TestGetServer_with_a_few_attached_routes
resource_server_test.go:216: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_with_a_few_attached_routes (42.06s)
=== RUN TestGetServer_with_invalid_route
--- PASS: TestGetServer_with_invalid_route (16.64s)
=== RUN TestCreateServer_with_invalid_network
--- PASS: TestCreateServer_with_invalid_network (9.67s)
=== RUN TestCreateServer_with_unsupported_network
--- PASS: TestCreateServer_with_unsupported_network (21.51s)
=== RUN TestCreateServer_with_invalid_bind_address
--- PASS: TestCreateServer_with_invalid_bind_address (20.96s)
=== RUN TestGetServer_with_default_host
--- PASS: TestGetServer_with_default_host (18.99s)
=== RUN TestGetServer_without_hosts
--- PASS: TestGetServer_without_hosts (31.33s)
=== RUN TestAccUser_basic
=== PAUSE TestAccUser_basic
=== CONT TestDataSourceHost
=== CONT TestAccUser_basic
=== CONT TestAccOrganization_basic
--- PASS: TestDataSourceHost (24.78s)
--- PASS: TestAccOrganization_basic (54.90s)
--- PASS: TestAccUser_basic (55.98s)
FAIL
coverage: 64.1% of statements
FAIL github.com/disc/terraform-provider-pritunl/internal/provider 419.063s
FAIL
make: *** [test] Error 1
tf_pritunl_acc_test
452946e4896be03f21db9832e177480ce1d64cee9612f007415f3e2f52d6d8af
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
--- PASS: TestGetServer_basic (50.93s)
=== RUN TestGetServer_with_attached_organization
--- PASS: TestGetServer_with_attached_organization (32.37s)
=== RUN TestGetServer_with_a_few_attached_organizations
resource_server_test.go:102: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=3) {
(string) (len=18) "organization_ids.0": (string) (len=24) "6183d5c9b7e22d0001ace447",
(string) (len=18) "organization_ids.1": (string) (len=24) "6183d5c9b7e22d0001ace44d",
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=3) {
(string) (len=18) "organization_ids.0": (string) (len=24) "6183d5c9b7e22d0001ace44d",
(string) (len=18) "organization_ids.1": (string) (len=24) "6183d5c9b7e22d0001ace447",
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_with_a_few_attached_organizations (26.77s)
=== RUN TestGetServer_with_attached_route
--- PASS: TestGetServer_with_attached_route (33.73s)
=== RUN TestGetServer_with_a_few_attached_routes
--- PASS: TestGetServer_with_a_few_attached_routes (31.57s)
=== RUN TestGetServer_with_invalid_route
--- PASS: TestGetServer_with_invalid_route (7.09s)
=== RUN TestCreateServer_with_invalid_network
--- PASS: TestCreateServer_with_invalid_network (9.11s)
=== RUN TestCreateServer_with_unsupported_network
--- PASS: TestCreateServer_with_unsupported_network (21.32s)
=== RUN TestCreateServer_with_invalid_bind_address
--- PASS: TestCreateServer_with_invalid_bind_address (21.03s)
=== RUN TestGetServer_with_default_host
--- PASS: TestGetServer_with_default_host (18.58s)
=== RUN TestGetServer_without_hosts
--- PASS: TestGetServer_without_hosts (32.63s)
=== RUN TestAccUser_basic
=== PAUSE TestAccUser_basic
=== CONT TestDataSourceHost
=== CONT TestAccUser_basic
=== CONT TestAccOrganization_basic
--- PASS: TestDataSourceHost (23.97s)
--- PASS: TestAccOrganization_basic (54.56s)
--- PASS: TestAccUser_basic (61.17s)
FAIL
coverage: 64.1% of statements
FAIL github.com/disc/terraform-provider-pritunl/internal/provider 346.608s
FAIL
make: *** [test] Error 1
tf_pritunl_acc_test
13aa7fcbdd7f1114514e2f2cd83c85b2dbfbd7ffde91a423628c3d53458d35b7
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
--- PASS: TestGetServer_basic (50.36s)
=== RUN TestGetServer_with_attached_organization
--- PASS: TestGetServer_with_attached_organization (30.64s)
=== RUN TestGetServer_with_a_few_attached_organizations
resource_server_test.go:102: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=2) {
(string) (len=18) "organization_ids.0": (string) (len=24) "6183d70fb7e22d0001a8e58a",
(string) (len=18) "organization_ids.1": (string) (len=24) "6183d72eb7e22d0001a8e5f6"
}
(map[string]string) (len=2) {
(string) (len=18) "organization_ids.0": (string) (len=24) "6183d72eb7e22d0001a8e5f6",
(string) (len=18) "organization_ids.1": (string) (len=24) "6183d70fb7e22d0001a8e58a"
}
--- FAIL: TestGetServer_with_a_few_attached_organizations (26.13s)
=== RUN TestGetServer_with_attached_route
--- PASS: TestGetServer_with_attached_route (31.05s)
=== RUN TestGetServer_with_a_few_attached_routes
--- PASS: TestGetServer_with_a_few_attached_routes (32.76s)
=== RUN TestGetServer_with_invalid_route
--- PASS: TestGetServer_with_invalid_route (7.34s)
=== RUN TestCreateServer_with_invalid_network
--- PASS: TestCreateServer_with_invalid_network (9.41s)
=== RUN TestCreateServer_with_unsupported_network
--- PASS: TestCreateServer_with_unsupported_network (21.46s)
=== RUN TestCreateServer_with_invalid_bind_address
--- PASS: TestCreateServer_with_invalid_bind_address (21.58s)
=== RUN TestGetServer_with_default_host
--- PASS: TestGetServer_with_default_host (19.04s)
=== RUN TestGetServer_without_hosts
--- PASS: TestGetServer_without_hosts (31.71s)
=== RUN TestAccUser_basic
=== PAUSE TestAccUser_basic
=== CONT TestDataSourceHost
=== CONT TestAccUser_basic
=== CONT TestAccOrganization_basic
--- PASS: TestDataSourceHost (23.61s)
--- PASS: TestAccUser_basic (53.69s)
--- PASS: TestAccOrganization_basic (54.31s)
FAIL
coverage: 64.1% of statements
FAIL github.com/disc/terraform-provider-pritunl/internal/provider 336.073s
FAIL
make: *** [test] Error 1
tf_pritunl_acc_test
3b6f32da89154eec5c64330f247ee8ade9d7485cc4980d1627ead58314ffcb10
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
resource_server_test.go:14: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_basic (25.55s)
=== RUN TestGetServer_with_attached_organization
--- PASS: TestGetServer_with_attached_organization (34.04s)
=== RUN TestGetServer_with_a_few_attached_organizations
resource_server_test.go:102: Step 1/3 error: Error running apply: exit status 1
2021/11/04 08:56:23 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.14.0
Error: Non-200 response on creating the organization
body=401: Unauthorized
on terraform_plugin_test.tf line 2, in resource "pritunl_organization" "test":
2: resource "pritunl_organization" "test" {
--- FAIL: TestGetServer_with_a_few_attached_organizations (12.97s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x19de82d]
goroutine 1492 [running]:
testing.tRunner.func1.2(0x1ac18a0, 0x22fd5a0)
/usr/local/opt/go/libexec/src/testing/testing.go:1143 +0x332
testing.tRunner.func1(0xc00065a900)
/usr/local/opt/go/libexec/src/testing/testing.go:1146 +0x4b6
panic(0x1ac18a0, 0x22fd5a0)
/usr/local/opt/go/libexec/src/runtime/panic.go:965 +0x1b9
github.com/disc/terraform-provider-pritunl/internal/provider.testGetServerDestroy(0xc0003fc1c0, 0xc00065a900, 0xc0002a9348)
/Users/douglethin/.go/src/github.com/disc/terraform-provider-pritunl/internal/provider/resource_server_test.go:520 +0xad
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.runPostTestDestroy(0x1d94548, 0xc00065a900, 0x0, 0xc0000e4c90, 0xc0004788d0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing_new.go:34 +0xeb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.runNewTest.func1(0x1d94548, 0xc00065a900, 0xc0002c6c00, 0xc0002a9ac8)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing_new.go:68 +0x328
runtime.Goexit()
/usr/local/opt/go/libexec/src/runtime/panic.go:613 +0x1e5
testing.(*common).FailNow(0xc00065a900)
/usr/local/opt/go/libexec/src/testing/testing.go:741 +0x3c
testing.(*common).Fatalf(0xc00065a900, 0x1bfa39d, 0x14, 0xc0006e6780, 0x3, 0x3)
/usr/local/opt/go/libexec/src/testing/testing.go:815 +0x93
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.runNewTest(0x1d94548, 0xc00065a900, 0x0, 0xc0000e4c90, 0xc0004788d0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing_new.go:151 +0x568
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.Test(0x1d94548, 0xc00065a900, 0x0, 0xc0000e4c90, 0xc0004788d0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing.go:566 +0x3e5
github.com/disc/terraform-provider-pritunl/internal/provider.TestGetServer_with_a_few_attached_organizations(0xc00065a900)
/Users/douglethin/.go/src/github.com/disc/terraform-provider-pritunl/internal/provider/resource_server_test.go:102 +0x57e
testing.tRunner(0xc00065a900, 0x1c347f0)
/usr/local/opt/go/libexec/src/testing/testing.go:1193 +0xef
created by testing.(*T).Run
/usr/local/opt/go/libexec/src/testing/testing.go:1238 +0x2b3
FAIL github.com/disc/terraform-provider-pritunl/internal/provider 72.817s
FAIL
make: *** [test] Error 1
tf_pritunl_acc_test
a4fa3ef9d277f5325658f160c535b84b00b1a86e7233f0f6c2ddec9f0de461a8
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
--- PASS: TestGetServer_basic (51.41s)
=== RUN TestGetServer_with_attached_organization
resource_server_test.go:58: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_with_attached_organization (26.92s)
=== RUN TestGetServer_with_a_few_attached_organizations
resource_server_test.go:102: Step 1/3 error: Error running apply: exit status 1
2021/11/04 08:58:07 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.14.0
Error: Non-200 response on creating the organization
body=401: Unauthorized
on terraform_plugin_test.tf line 6, in resource "pritunl_organization" "test2":
6: resource "pritunl_organization" "test2" {
--- FAIL: TestGetServer_with_a_few_attached_organizations (12.85s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x19de82d]
goroutine 2061 [running]:
testing.tRunner.func1.2(0x1ac18a0, 0x22fd5a0)
/usr/local/opt/go/libexec/src/testing/testing.go:1143 +0x332
testing.tRunner.func1(0xc000336900)
/usr/local/opt/go/libexec/src/testing/testing.go:1146 +0x4b6
panic(0x1ac18a0, 0x22fd5a0)
/usr/local/opt/go/libexec/src/runtime/panic.go:965 +0x1b9
github.com/disc/terraform-provider-pritunl/internal/provider.testGetServerDestroy(0xc00024a000, 0xc000336900, 0xc000c0b348)
/Users/douglethin/.go/src/github.com/disc/terraform-provider-pritunl/internal/provider/resource_server_test.go:520 +0xad
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.runPostTestDestroy(0x1d94548, 0xc000336900, 0x0, 0xc0006861e0, 0xc000110330, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing_new.go:34 +0xeb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.runNewTest.func1(0x1d94548, 0xc000336900, 0xc0008a5500, 0xc000c0bac8)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing_new.go:68 +0x328
runtime.Goexit()
/usr/local/opt/go/libexec/src/runtime/panic.go:613 +0x1e5
testing.(*common).FailNow(0xc000336900)
/usr/local/opt/go/libexec/src/testing/testing.go:741 +0x3c
testing.(*common).Fatalf(0xc000336900, 0x1bfa39d, 0x14, 0xc0005150e0, 0x3, 0x3)
/usr/local/opt/go/libexec/src/testing/testing.go:815 +0x93
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.runNewTest(0x1d94548, 0xc000336900, 0x0, 0xc0006861e0, 0xc000110330, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing_new.go:151 +0x568
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.Test(0x1d94548, 0xc000336900, 0x0, 0xc0006861e0, 0xc000110330, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/douglethin/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource/testing.go:566 +0x3e5
github.com/disc/terraform-provider-pritunl/internal/provider.TestGetServer_with_a_few_attached_organizations(0xc000336900)
/Users/douglethin/.go/src/github.com/disc/terraform-provider-pritunl/internal/provider/resource_server_test.go:102 +0x57e
testing.tRunner(0xc000336900, 0x1c347f0)
/usr/local/opt/go/libexec/src/testing/testing.go:1193 +0xef
created by testing.(*T).Run
/usr/local/opt/go/libexec/src/testing/testing.go:1238 +0x2b3
FAIL github.com/disc/terraform-provider-pritunl/internal/provider 91.430s
FAIL
make: *** [test] Error 1
tf_pritunl_acc_test
785788a630d62ed115925a4d04239dbc5d278ee77b7df52a80705b3f43470e27
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
--- PASS: TestGetServer_basic (51.05s)
=== RUN TestGetServer_with_attached_organization
--- PASS: TestGetServer_with_attached_organization (33.32s)
=== RUN TestGetServer_with_a_few_attached_organizations
resource_server_test.go:102: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=2) {
(string) (len=18) "organization_ids.0": (string) (len=24) "6183d94eb7e22d00016255fe",
(string) (len=18) "organization_ids.1": (string) (len=24) "6183d94eb7e22d0001625603"
}
(map[string]string) (len=2) {
(string) (len=18) "organization_ids.0": (string) (len=24) "6183d94eb7e22d0001625603",
(string) (len=18) "organization_ids.1": (string) (len=24) "6183d94eb7e22d00016255fe"
}
--- FAIL: TestGetServer_with_a_few_attached_organizations (28.42s)
=== RUN TestGetServer_with_attached_route
--- PASS: TestGetServer_with_attached_route (32.63s)
=== RUN TestGetServer_with_a_few_attached_routes
--- PASS: TestGetServer_with_a_few_attached_routes (32.09s)
=== RUN TestGetServer_with_invalid_route
--- PASS: TestGetServer_with_invalid_route (7.37s)
=== RUN TestCreateServer_with_invalid_network
--- PASS: TestCreateServer_with_invalid_network (9.57s)
=== RUN TestCreateServer_with_unsupported_network
--- PASS: TestCreateServer_with_unsupported_network (21.41s)
=== RUN TestCreateServer_with_invalid_bind_address
--- PASS: TestCreateServer_with_invalid_bind_address (21.42s)
=== RUN TestGetServer_with_default_host
--- PASS: TestGetServer_with_default_host (19.42s)
=== RUN TestGetServer_without_hosts
--- PASS: TestGetServer_without_hosts (32.39s)
=== RUN TestAccUser_basic
=== PAUSE TestAccUser_basic
=== CONT TestDataSourceHost
=== CONT TestAccUser_basic
=== CONT TestAccOrganization_basic
--- PASS: TestDataSourceHost (23.13s)
--- PASS: TestAccOrganization_basic (53.95s)
--- PASS: TestAccUser_basic (55.63s)
FAIL
coverage: 64.1% of statements
FAIL github.com/disc/terraform-provider-pritunl/internal/provider 345.004s
FAIL
make: *** [test] Error 1
tf_pritunl_acc_test
587f0221a88ef610a953c4259f2ed032c177ead6e1913ad4ac5416d948ba485e
sleep 10
./tools/wait-for-it.sh localhost:27017 -- echo "mongodb is up"
wait-for-it.sh: waiting 15 seconds for localhost:27017
wait-for-it.sh: localhost:27017 is available after 0 seconds
mongodb is up
# enables an api access for the pritunl user, updates an api token and secret
MongoDB shell version: 3.2.22
connecting to: test
switched to db pritunl
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
bye
TF_ACC=1 \
PRITUNL_URL="https://localhost/" \
PRITUNL_INSECURE="true" \
PRITUNL_TOKEN=tfacctest_token \
PRITUNL_SECRET=tfacctest_secret \
go test -v -cover -count 1 ./internal/provider
=== RUN TestDataSourceHost
=== PAUSE TestDataSourceHost
=== RUN TestAccOrganization_basic
=== PAUSE TestAccOrganization_basic
=== RUN TestGetServer_basic
resource_server_test.go:14: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "offline"
}
(map[string]string) (len=1) {
(string) (len=6) "status": (string) (len=7) "pending"
}
--- FAIL: TestGetServer_basic (26.17s)
=== RUN TestGetServer_with_attached_organization
^CFAIL github.com/disc/terraform-provider-pritunl/internal/provider 47.730s
make: *** [test] Error 1
❯
Here's my test output.