本文整理匯總了TypeScript中models/elastic_profiles/types.ElasticAgentProfile類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ElasticAgentProfile類的具體用法?TypeScript ElasticAgentProfile怎麽用?TypeScript ElasticAgentProfile使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ElasticAgentProfile類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("should serialize elastic agent profile", () => {
const elasticProfile = new ElasticAgentProfile(
"docker1",
"cd.go.docker",
"prod-cluster",
new Configurations([
new Configuration("image", new PlainTextValue("gocd/server")),
new Configuration("secret", new EncryptedValue("alskdad"))
]));
expect(JSON.parse(JSON.stringify(elasticProfile.toJSON()))).toEqual({
id: "docker1",
plugin_id: "cd.go.docker",
cluster_profile_id: "prod-cluster",
properties: [{
key: "image",
value: "gocd/server"
},
{
key: "secret",
encrypted_value: "alskdad"
}
]
});
});