Skip to content

Commit

Permalink
change tag
Browse files Browse the repository at this point in the history
  • Loading branch information
NameHaibinZhang committed Nov 14, 2024
1 parent 51b4c53 commit f5a70eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/unittest/metadata/K8sMetadataUnittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class k8sMetadataUnittest : public ::testing::Test {
EXPECT_TRUE(result);
EXPECT_EQ(info.images["image1"], "nginx:latest");
EXPECT_EQ(info.labels["app_id"], "my_app_id");
EXPECT_EQ(info.appId, "my_app_id");
EXPECT_EQ(info.k8sNamespace, "default");
EXPECT_EQ(info.workloadKind, "Deployment");
EXPECT_EQ(info.workloadName, "nginx-deployment");
Expand Down Expand Up @@ -315,6 +314,8 @@ class k8sMetadataUnittest : public ::testing::Test {
mSpanEvent->SetScopeTag(string("key2"), string("value2"));
LabelingK8sMetadata& processor = *(new LabelingK8sMetadata);
processor.AddLabels(*mSpanEvent, container_vec, remote_ip_vec);
APSARA_TEST_EQUAL("kube-system", mSpanEvent->GetTag("k8s.namespace.name").to_string());
APSARA_TEST_EQUAL("daemonset", mSpanEvent->GetTag("peer.workload.kind").to_string());
APSARA_TEST_EQUAL("kube-proxy-worker", mSpanEvent->GetTag("peer.workload.name").to_string());
APSARA_TEST_TRUE_FATAL(k8sMetadata.GetInfoByIpFromCache("10.41.0.2") != nullptr);
}
Expand Down

0 comments on commit f5a70eb

Please sign in to comment.