Skip to content

fix(test-utils): extend assertCloudResource with cloud.platform #2822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
fix(test-utils): extend assertCloudResource with cloud.platform
Signed-off-by: Kasper Borg Nissen <[email protected]>
  • Loading branch information
kaspernissen committed May 13, 2025
commit 4af839540bed2d718f05675009994b2dbcc5c6f0
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
SEMRESATTRS_CLOUD_AVAILABILITY_ZONE,
SEMRESATTRS_CLOUD_PROVIDER,
SEMRESATTRS_CLOUD_REGION,
SEMRESATTRS_CLOUD_PLATFORM,
SEMRESATTRS_CONTAINER_ID,
SEMRESATTRS_CONTAINER_IMAGE_NAME,
SEMRESATTRS_CONTAINER_IMAGE_TAG,
Expand Down Expand Up @@ -63,6 +64,7 @@ export const assertCloudResource = (
accountId?: string;
region?: string;
zone?: string;
platform?: string;
}
) => {
assertHasOneLabel('cloud', resource);
Expand All @@ -86,6 +88,11 @@ export const assertCloudResource = (
resource.attributes[SEMRESATTRS_CLOUD_AVAILABILITY_ZONE],
validations.zone
);
if (validations.platform)
assert.strictEqual(
resource.attributes[SEMRESATTRS_CLOUD_PLATFORM],
validations.platform
);
};

/**
Expand Down
Loading