Skip to content

Commit bd2fdb7

Browse files
CLI-171 Add E2E test for sonar-secrets download from binaries.sonarsource.com (#124)
1 parent 0f255b6 commit bd2fdb7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/integration/specs/install/install-secrets.test.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,32 @@ describe('install secrets (download)', () => {
102102
);
103103
});
104104

105+
describe('install secrets (network)', () => {
106+
let harness: TestHarness;
107+
108+
beforeEach(async () => {
109+
harness = await TestHarness.create();
110+
});
111+
112+
afterEach(async () => {
113+
await harness.dispose();
114+
});
115+
116+
it(
117+
'downloads and installs sonar-secrets binary from binaries.sonarsource.com',
118+
async () => {
119+
harness.withAuth('http://localhost:19999', 'fake-token');
120+
// No fake binaries server: the CLI hits the real binaries.sonarsource.com
121+
122+
const result = await harness.run('install secrets');
123+
124+
expect(result.exitCode).toBe(0);
125+
expect(harness.cliHome.file('bin', 'sonar-secrets').exists()).toBe(true);
126+
},
127+
{ timeout: 120000 },
128+
);
129+
});
130+
105131
describe('install secrets --status', () => {
106132
let harness: TestHarness;
107133

0 commit comments

Comments
 (0)