Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infra support and helper function to create real datasource #1146

Merged
merged 27 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
be94338
Add infra support and helper function to create real datasource
derek-ho Mar 14, 2024
1b315ac
Remove logs from previous change
derek-ho Mar 14, 2024
7146b08
Add test that uses the helper function to verify functionality
derek-ho Mar 15, 2024
8364c60
Change to request and add it to appropriate workflows
derek-ho Mar 22, 2024
5319fe8
Add basic auth remote cluster
derek-ho Apr 3, 2024
f7d2337
Call function
derek-ho Apr 3, 2024
47c4784
Move action
derek-ho Apr 18, 2024
190a460
Update action and usage in docs
derek-ho Apr 19, 2024
42dd612
Checkout before access
derek-ho Apr 19, 2024
b5bc25a
Add relative path
derek-ho Apr 19, 2024
1037a22
Fix spelling
derek-ho Apr 19, 2024
ccf3955
Merge branch 'main' of github.com:opensearch-project/opensearch-dashb…
derek-ho Apr 19, 2024
3521a62
Remove -d
derek-ho Apr 19, 2024
26f4063
Move port logic
derek-ho Apr 19, 2024
bd6b99c
Cat log
derek-ho Apr 19, 2024
10ed3c2
Allow modification
derek-ho Apr 19, 2024
5929aab
Duplicate download
derek-ho Apr 19, 2024
8ef0669
Change directory
derek-ho Apr 19, 2024
05f710d
Change name
derek-ho Apr 19, 2024
adf18e4
Remove extra chmod
derek-ho Apr 19, 2024
466639d
Within test directory
derek-ho Apr 19, 2024
6394859
Fix
derek-ho Apr 19, 2024
ca96d3a
Fix for windows, add helper function, show usage
derek-ho Apr 19, 2024
5c2e239
Remove pwd
derek-ho Apr 19, 2024
5263a92
Move to temp dire
derek-ho Apr 19, 2024
46d3442
Address PR feedback and try to spin up an instance with security
derek-ho Apr 22, 2024
d0839fa
Small action change and documentation add
derek-ho Apr 22, 2024
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
5 changes: 5 additions & 0 deletions .github/workflows/release-signoff-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
cd opensearch-${{ env.VERSION }}/
./opensearch-tar-install.sh &
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
- uses: derek-ho/start-opensearch@v3
derek-ho marked this conversation as resolved.
Show resolved Hide resolved
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-signoff-chromium-ad-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
cd opensearch-${{ env.VERSION }}/
./opensearch-tar-install.sh &
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
- uses: derek-ho/start-opensearch@v3
derek-ho marked this conversation as resolved.
Show resolved Hide resolved
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-signoff-chromium-ism-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
cd opensearch-${{ env.VERSION }}/
./opensearch-tar-install.sh &
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
- uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ const REGION = 'us-east-1';
const ACCESS_KEY = 'accessKey';
const SECRET_KEY = 'secretKey';

export const CreateDataSourceNoAuth = () => {
cy.visit(
'http://localhost:5601/app/management/opensearch-dashboards/dataSources/create'
);
cy.get('[data-test-subj="createDataSourceFormTitleField"]').type('9201');
cy.get('[data-test-subj="createDataSourceFormEndpointField"]').type(
'http://localhost:9201'
);
cy.get('[data-test-subj="createDataSourceFormAuthTypeSelect"]').click();
cy.get('#no_auth').click();
cy.get('[data-test-subj="createDataSourceTestConnectionButton"]').click();
cy.get('.euiToastHeader__title').should('contain', 'successful');
cy.get('[data-test-subj="createDataSourceButton"]').click();
};

// TODO: create datasource with basic auth and sigv4

if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
describe('Create datasources', () => {
before(() => {
Expand Down
15 changes: 15 additions & 0 deletions cypress/utils/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,21 @@ Cypress.Commands.add('createIndexPattern', (id, attributes, header = {}) => {
Cypress.config().baseUrl
}/api/saved_objects/index-pattern/${id}`;

console.log(JSON.stringify(url));
console.log(
JSON.stringify({
'content-type': 'application/json;charset=UTF-8',
'osd-xsrf': true,
...header,
})
);
console.log(
JSON.stringify({
attributes,
references: [],
})
);

cy.request({
method: 'POST',
url,
Expand Down
Loading