Skip to content

Commit 08b1581

Browse files
author
Kingdon Barrett
committed
add one test for OCI sources
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
1 parent 756b92d commit 08b1581

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/suite/extension.test.ts

+16
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ suite('Extension Test Suite', () => {
9797
assert.strictEqual(source, undefined, 'Removing a GitSource and refreshing all views should unlist it');
9898
});
9999

100+
test('OCI Sources are listed', async function() {
101+
this.timeout(15000);
102+
103+
await api.shell.execWithOutput('flux create source oci podinfo --url=oci://ghcr.io/kingdonb/podinfo/deploy --tag-semver 6.1.x');
104+
await vscode.commands.executeCommand('gitops.views.refreshSourceTreeView');
105+
106+
let source = await getTreeItem(api.data.sourceTreeViewProvider, 'OCIRepository: podinfo');
107+
assert.notStrictEqual(source, undefined, 'Adding a OCI Source and refreshing the view should list it');
108+
109+
await api.shell.execWithOutput('flux delete source oci podinfo -s');
110+
await vscode.commands.executeCommand('gitops.views.refreshAllTreeViews'); // refresh all'
111+
112+
source = await getTreeItem(api.data.sourceTreeViewProvider, 'OCIRepository: podinfo');
113+
assert.strictEqual(source, undefined, 'Removing an OCI Source and refreshing all views should unlist it');
114+
});
115+
100116
test('Kustomizations are listed', async function() {
101117
this.timeout(10000);
102118

0 commit comments

Comments
 (0)