Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import { assert, beforeEach, afterEach, it, describe } from "vitest";
import { createRecorder } from "./utils/recordedClient.js";
import { WorkloadOrchestrationManagementClient } from "../../src/workloadOrchestrationManagementClient.js";

import * as logger from '@azure/logger';

logger.setLogLevel('verbose');

export const testPollingOptions = {
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
};
Expand Down Expand Up @@ -45,4 +49,59 @@ describe("WorkloadOrchestration test", () => {
}
assert.ok(resArray);
});

it.only("solutionTemplates createVersion test", async function () {
const resourceGroupName = "test-rg";
const solutionTemplateName = "test-solution-template";
const schemaName = "test-schema";
const schemaVersion = "1.0.0";
const version = "1.0.0";

const configurationsStr = `schema:
name: ${schemaName}
version: ${schemaVersion}
configs:
AppName: Hotmelt
TemperatureRangeMax: \${{$val(TemperatureRangeMax)}}
ErrorThreshold: \${{$val(ErrorThreshold)}}
HealthCheckEndpoint: \${{$val(HealthCheckEndpoint)}}
EnableLocalLog: \${{$val(EnableLocalLog)}}
AgentEndpoint: \${{$val(AgentEndpoint)}}
HealthCheckEnabled: \${{$val(HealthCheckEnabled)}}
ApplicationEndpoint: \${{$val(ApplicationEndpoint)}}`;

const result = await client.solutionTemplates.createVersion(
resourceGroupName,
solutionTemplateName,
{
version: version,
solutionTemplateVersion: {
properties: {
configurations: configurationsStr,
specification: {
components: [
{
name: "helmcomponent",
type: "helm.v3",
properties: {
chart: {
repo: "ghcr.io/eclipse-symphony/tests/helm/simple-chart",
version: "0.3.0",
wait: true,
timeout: "5m",
},
},
},
],
},
orchestratorType: "TO",
},
},
},
);

assert.ok(result);
assert.ok(result.properties);
console.log("Solution template version created successfully:", result.name);
});
});
Loading