Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tyanko1 committed Nov 30, 2023
1 parent e0504e7 commit e4f9f29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
24 changes: 0 additions & 24 deletions .github/actions/promote_docker_image/test/action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,6 @@ import { Act } from '@kie/act-js';
import { getCompositeActionConfig, runCompositeAction } from 'tests/utils/setup';
import { getTestResult } from 'tests/utils/helpers';

const mockServer = require('mockttp').getLocal();

async function mockAwsSts() {
await mockServer.start(8000);
await mockServer.forAnyRequest().thenReply(200, 'Hello World!');
}

mockAwsSts();

const httpProxy = require('http-proxy');
const proxy = httpProxy.createProxyServer({
target: 'http://localhost:8000',
});

proxy.on('proxyReq', function(proxyReq, req, res, options) {});

proxy.listen(8080);


const repoName = 'promote_docker_image';

let mockGithub: MockGithub;
Expand All @@ -36,11 +17,6 @@ afterEach(async () => {
await mockGithub.teardown();
});

// mockAWS.mock('STS', '*', (params, callback) => {
// console.log('getCallerIdenity called with', params);
// callback(null, 'success');
// });

test('The correct source account credentials are configured', async () => {
const results = await runCompositeAction({
act: new Act(mockGithub.repo.getPath(repoName)),
Expand Down
9 changes: 1 addition & 8 deletions .github/actions/promote_docker_image/test/action_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,4 @@ jobs:
destination-account-id: 564077667165
env:
AWS_ACCESS_KEY_ID: 'GITHUB_RUNNER_AWS_ACCESS_KEY_ID'
AWS_SECRET_ACCESS_KEY: 'GITHUB_RUNNER_AWS_SECRET_KEY'
AWS_REGION: 'us-east-1'
AWS_ENDPOINT_URL: https://host.docker.internal:8080
# AWS_ENDPOINT: host.docker.internal:8000
HTTPS_PROXY: https://host.docker.internal:8080
HTTP_PROXY: http://host.docker.internal:8080
# AWS_STS_ENDPOINT: http://localhost:8000
# AWS_STS_ENDPOINT: http://host.docker.internal:8000
AWS_SECRET_ACCESS_KEY: 'GITHUB_RUNNER_AWS_SECRET_KEY'

0 comments on commit e4f9f29

Please sign in to comment.