ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c in libmongocrypt-helper-1.8.0.0.1001 vs ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c in libmongocrypt-helper-1.11.0.0.1001

- old
+ new

@@ -44,11 +44,11 @@ const char *endpoint; mongocrypt_kms_ctx_endpoint(kms, &endpoint); ASSERT_STREQUAL("oauth2.googleapis.com:443", endpoint); /* Satisfy request. */ - ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/gcp-auth/oauth-response.txt")), kms); + ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/kms-gcp/oauth-response.txt")), kms); ASSERT_CMPINT((int)mongocrypt_kms_ctx_bytes_needed(kms), ==, 0); kms = mongocrypt_ctx_next_kms_ctx(ctx); ASSERT_OR_PRINT_MSG(NULL == kms, "expected NULL KMS context, got non-NULL"); ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx); @@ -62,11 +62,11 @@ const char *endpoint; mongocrypt_kms_ctx_endpoint(kms, &endpoint); ASSERT_STREQUAL("cloudkms.googleapis.com:443", endpoint); /* Satisfy request. */ - ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/gcp-auth/encrypt-response.txt")), kms); + ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/kms-gcp/encrypt-response.txt")), kms); ASSERT_CMPINT((int)mongocrypt_kms_ctx_bytes_needed(kms), ==, 0); kms = mongocrypt_ctx_next_kms_ctx(ctx); ASSERT_OR_PRINT_MSG(NULL == kms, "expected NULL KMS context, got non-NULL"); ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx); @@ -107,11 +107,11 @@ const char *endpoint; mongocrypt_kms_ctx_endpoint(kms, &endpoint); ASSERT_STREQUAL("oauth2.googleapis.com:443", endpoint); /* Satisfy request. */ - ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/gcp-auth/oauth-response.txt")), kms); + ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/kms-gcp/oauth-response.txt")), kms); ASSERT_CMPINT((int)mongocrypt_kms_ctx_bytes_needed(kms), ==, 0); kms = mongocrypt_ctx_next_kms_ctx(ctx); ASSERT_OR_PRINT_MSG(NULL == kms, "expected NULL KMS context, got non-NULL"); ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx); @@ -125,11 +125,11 @@ const char *endpoint; mongocrypt_kms_ctx_endpoint(kms, &endpoint); ASSERT_STREQUAL("cloudkms.googleapis.com:443", endpoint); /* Satisfy request. */ - ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/gcp-auth/decrypt-response.txt")), kms); + ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/kms-gcp/decrypt-response.txt")), kms); ASSERT_CMPINT((int)mongocrypt_kms_ctx_bytes_needed(kms), ==, 0); kms = mongocrypt_ctx_next_kms_ctx(ctx); ASSERT_OR_PRINT_MSG(NULL == kms, "expected NULL KMS context, got non-NULL"); ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx); @@ -155,11 +155,11 @@ "}"; crypt = mongocrypt_new(); ASSERT_OK(mongocrypt_setopt_kms_providers(crypt, TEST_BSON("{'gcp': {}}")), crypt); mongocrypt_setopt_use_need_kms_credentials_state(crypt); - ASSERT_OK(mongocrypt_init(crypt), crypt); + ASSERT_OK(_mongocrypt_init_for_test(crypt), crypt); ctx = mongocrypt_ctx_new(crypt); ASSERT_OK(mongocrypt_ctx_setopt_key_encryption_key(ctx, TEST_BSON(kek)), ctx); ASSERT_OK(mongocrypt_ctx_datakey_init(ctx), ctx); ASSERT_STATE_EQUAL(mongocrypt_ctx_state(ctx), MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS); @@ -173,11 +173,11 @@ const char *endpoint; mongocrypt_kms_ctx_endpoint(kms, &endpoint); ASSERT_STREQUAL("cloudkms.googleapis.com:443", endpoint); /* Satisfy request. */ - ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/gcp-auth/encrypt-response.txt")), kms); + ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/kms-gcp/encrypt-response.txt")), kms); ASSERT_CMPINT((int)mongocrypt_kms_ctx_bytes_needed(kms), ==, 0); kms = mongocrypt_ctx_next_kms_ctx(ctx); ASSERT_OR_PRINT_MSG(NULL == kms, "expected NULL KMS context, got non-NULL"); ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx); @@ -197,11 +197,11 @@ const char *uuid_data = "\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61"; crypt = mongocrypt_new(); ASSERT_OK(mongocrypt_setopt_kms_providers(crypt, TEST_BSON("{'gcp': {}}")), crypt); mongocrypt_setopt_use_need_kms_credentials_state(crypt); - ASSERT_OK(mongocrypt_init(crypt), crypt); + ASSERT_OK(_mongocrypt_init_for_test(crypt), crypt); ctx = mongocrypt_ctx_new(crypt); uuid = mongocrypt_binary_new_from_data((uint8_t *)uuid_data, UUID_LEN); ASSERT_OK(mongocrypt_ctx_setopt_key_id(ctx, uuid), ctx); ASSERT_OK(mongocrypt_ctx_setopt_algorithm(ctx, MONGOCRYPT_ALGORITHM_DETERMINISTIC_STR, -1), ctx); ASSERT_OK(mongocrypt_ctx_explicit_encrypt_init(ctx, TEST_BSON("{'v': 1}")), ctx); @@ -225,10 +225,10 @@ const char *endpoint; mongocrypt_kms_ctx_endpoint(kms, &endpoint); ASSERT_STREQUAL("cloudkms.googleapis.com:443", endpoint); /* Satisfy request. */ - ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/gcp-auth/decrypt-response.txt")), kms); + ASSERT_OK(mongocrypt_kms_ctx_feed(kms, TEST_FILE("./test/data/kms-gcp/decrypt-response.txt")), kms); ASSERT_CMPINT((int)mongocrypt_kms_ctx_bytes_needed(kms), ==, 0); kms = mongocrypt_ctx_next_kms_ctx(ctx); ASSERT_OR_PRINT_MSG(NULL == kms, "expected NULL KMS context, got non-NULL"); ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx);