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