Skip to content

Commit f8fb3fa

Browse files
Add security plugin changes (#160)
Signed-off-by: Prudhvi Godithi <[email protected]>
1 parent d8e81eb commit f8fb3fa

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ jobs:
9191
- name: Wait for OpenSearch
9292
# ensure that OS has come up and is available
9393
run: |
94-
./script/wait-for-endpoint --timeout=20 http://admin:admin@localhost:9200
94+
./script/wait-for-endpoint --timeout=60 http://admin:myStrongPassword123%40456@localhost:9200
9595
- name: Dump docker logs on failure
9696
if: failure()
9797
uses: jwalton/gh-docker-logs@v2
9898
- name: Run the tests
9999
run: |
100-
export OPENSEARCH_URL=http://admin:admin@localhost:9200
100+
export OPENSEARCH_URL=http://admin:myStrongPassword123%40456@localhost:9200
101101
export TF_LOG=INFO
102102
TF_ACC=1 go test ./... -v -parallel 20 -cover -short
103103
# check goreleaser config for deprecations

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export OPENSEARCH_URL=http://admin:admin@localhost:9200
5555
export TF_LOG=INFO
5656
TF_ACC=1 go test ./... -v -parallel 20 -cover -short
5757
```
58+
Note: Starting from version `2.12.0`, the `admin` user password is determined by the `OPENSEARCH_INITIAL_ADMIN_PASSWORD` environment variable. If testing against a cluster with version `2.12.0` or later and have set `OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123@456`, please update the URL as follows: `export OPENSEARCH_URL=http://admin:myStrongPassword123%40456@localhost:9200`
5859

5960
#### To Run Specific Test
6061
```sh

docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
- network.publish_host=127.0.0.1
1616
- logger.org.opensearch=warn
1717
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
18+
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123@456"
1819
- "plugins.security.ssl.http.enabled=false"
1920
- ${OSS_ENV_VAR:-FOO=bar}
2021
command: ${OS_COMMAND}

provider/provider_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func init() {
4646

4747
opendistroOriginalConfigureFunc := testAccOpendistroProvider.ConfigureContextFunc
4848
testAccOpendistroProvider.ConfigureContextFunc = func(c context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) {
49-
err := d.Set("url", "http://admin:[email protected]:9200")
49+
err := d.Set("url", os.Getenv("OPENSEARCH_URL"))
5050
if err != nil {
5151
return nil, diag.FromErr(err)
5252
}

0 commit comments

Comments
 (0)