Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions evergreen/evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ functions:
echo "Response Body: $response_body"
echo "HTTP Status: $http_status"
assume-ec2-role:
assume-aws-test-secrets-role:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to a more descriptive name

- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
Expand Down Expand Up @@ -665,9 +665,12 @@ functions:
params:
working_dir: mongo-csharp-driver
include_expansions_in_env:
- "ATLAS_SEARCH"
- "AWS_ACCESS_KEY_ID"
- "AWS_SECRET_ACCESS_KEY"
- "AWS_SESSION_TOKEN"
script: |
${PREPARE_SHELL}
. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas-qa
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I migrated test configuration from Evergreen project variables to AWS Secrets Manager

evergreen/run-atlas-search-test.sh
run-atlas-search-index-helpers-test:
Expand Down Expand Up @@ -1250,7 +1253,7 @@ tasks:

- name: atlas-connectivity-tests
commands:
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- func: run-atlas-connectivity-tests

- name: test-gssapi
Expand Down Expand Up @@ -1356,12 +1359,13 @@ tasks:

- name: atlas-data-lake-test
commands:
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- func: bootstrap-mongohoused
- func: run-atlas-data-lake-test

- name: atlas-search-test
commands:
- func: assume-aws-test-secrets-role
- func: run-atlas-search-test

- name: atlas-search-index-helpers-test
Expand Down Expand Up @@ -1419,7 +1423,7 @@ tasks:
${PREPARE_SHELL}
dotnet build
tar czf /tmp/mongo-csharp-driver.tgz tests/*.Tests/bin/Debug/net6.0/ ./evergreen/run-mongodb-oidc-env-tests.sh
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- func: run_oidc_k8s_tests
vars:
K8S_VARIANT: eks
Expand Down Expand Up @@ -1824,7 +1828,7 @@ tasks:
- name: x509-auth-tests
commands:
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- func: setup-x509-tests
- func: run-x509-tests
vars:
Expand Down Expand Up @@ -2006,7 +2010,7 @@ task_groups:
- func: fix-absolute-paths
- func: init-test-results
- func: make-files-executable
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- command: subprocess.exec
params:
binary: bash
Expand Down Expand Up @@ -2052,7 +2056,7 @@ task_groups:
- func: fix-absolute-paths
- func: init-test-results
- func: make-files-executable
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- command: subprocess.exec
params:
binary: bash
Expand Down Expand Up @@ -2096,7 +2100,7 @@ task_groups:
- func: fix-absolute-paths
- func: init-test-results
- func: make-files-executable
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- command: subprocess.exec
params:
binary: bash
Expand Down Expand Up @@ -2128,7 +2132,7 @@ task_groups:
setup_group:
- func: fetch-source
- func: prepare-resources
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- command: subprocess.exec
params:
binary: bash
Expand Down Expand Up @@ -2163,7 +2167,7 @@ task_groups:
- func: fix-absolute-paths
- func: init-test-results
- func: make-files-executable
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- command: subprocess.exec
params:
binary: bash
Expand Down Expand Up @@ -2191,7 +2195,7 @@ task_groups:
- func: prepare-resources
- func: fix-absolute-paths
- func: make-files-executable
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- func: install-dotnet
- command: subprocess.exec
params:
Expand Down Expand Up @@ -2222,7 +2226,7 @@ task_groups:
- func: prepare-resources
- func: fix-absolute-paths
- func: make-files-executable
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- func: install-dotnet
- command: subprocess.exec
params:
Expand Down Expand Up @@ -2253,7 +2257,7 @@ task_groups:
- func: fix-absolute-paths
- func: make-files-executable
- func: install-dotnet
- func: assume-ec2-role
- func: assume-aws-test-secrets-role
- command: subprocess.exec
params:
binary: bash
Expand Down
8 changes: 4 additions & 4 deletions tests/MongoDB.Driver.Tests/Search/AtlasSearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public AtlasSearchTests(ITestOutputHelper testOutputHelper) : base(testOutputHel
{
RequireEnvironment.Check().EnvironmentVariable("ATLAS_SEARCH_TESTS_ENABLED");

var atlasSearchUri = Environment.GetEnvironmentVariable("ATLAS_SEARCH");
var atlasSearchUri = Environment.GetEnvironmentVariable("ATLAS_SEARCH_URI");
Ensure.IsNotNullOrEmpty(atlasSearchUri, nameof(atlasSearchUri));

var mongoClientSettings = MongoClientSettings.FromConnectionString(atlasSearchUri);
Expand Down Expand Up @@ -436,8 +436,8 @@ public void PhraseSynonym()
result[0].Title.Should().Be("The Great Race");
result[1].Title.Should().Be("The Cannonball Run");
result[2].Title.Should().Be("National Mechanics");
result[3].Title.Should().Be("Genevieve");
result[4].Title.Should().Be("Speedway Junky");
result[3].Title.Should().Be("Speedway Junky");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some data changed in the sample data used for tests in the new cluster so I had to update this.

result[4].Title.Should().Be("Jo pour Jonathan");
}

[Fact]
Expand Down Expand Up @@ -866,7 +866,7 @@ public class Movie
public class EmbeddedMovie : Movie
{
[BsonElement("plot_embedding")]
public double[] Embedding { get; set; }
public BinaryVectorFloat32 Embedding { get; set; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plot_embedding field is stored as binary data in the database, but our code was trying to deserialize it directly to an array of doubles, which fails. I can't remember why this worked previously but my guess is that the sample data in the old cluster stored plot_embedding as a double array rather than binary.

}

[BsonIgnoreExtraElements]
Expand Down
2 changes: 1 addition & 1 deletion tests/MongoDB.Driver.Tests/Search/VectorSearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public VectorSearchTests(ITestOutputHelper testOutputHelper) : base(testOutputHe
{
RequireEnvironment.Check().EnvironmentVariable("ATLAS_SEARCH_TESTS_ENABLED");

var atlasSearchUri = Environment.GetEnvironmentVariable("ATLAS_SEARCH");
var atlasSearchUri = Environment.GetEnvironmentVariable("ATLAS_SEARCH_URI");
Ensure.IsNotNullOrEmpty(atlasSearchUri, nameof(atlasSearchUri));

var mongoClientSettings = MongoClientSettings.FromConnectionString(atlasSearchUri);
Expand Down