Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.0
1.22.6
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Unreleased

## v0.4.0
* Bump go version to 1.22.6

## v0.3.0
IMPROVEMENTS:
* Updated dependencies:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ A set of make targets are provided for quick and easy iterations when developing
server running locally and accessible via the `vault` CLI. See this [documentation](https://github.com/hashicorp/vault#developing-vault)
on how to get started with Vault.

1. `make setup-env` will start a Redis docker container and initialize a test user with the username `us3rn4m3` and passwod `user-pa55w0rd`
1. `make setup-env` will start a Redis docker container and initialize a test user with the username `default` and password `default-pa55w0rd`
2. `source ./bootstrap/terraform/local_environment_setup.sh` will export the necessary environment variables generated from the setup step
3. `make configure` will build the plugin, register it in your local Vault server and run sample commands to verify everything is working
4. `make testacc` will run the acceptance tests against the Redis container created during the environment setup
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/terraform/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
networks:
- redis
restart: always
command: "redis-server --requirepass default-pa55w0rd --user us4rn4m3 on >user-pa55w0rd ~* allcommands"
command: "redis-server --requirepass default-pa55w0rd"
ports:
- "6379:6379"
volumes:
Expand Down
14 changes: 7 additions & 7 deletions bootstrap/terraform/redis.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "null_resource" "docker_compose_up" {

// Running down at the beginning so terraform apply can be executed multiple times to pick up on latest docker-compose.yaml changes
provisioner "local-exec" {
command = "docker-compose -f ./docker-compose.yml down && docker-compose -f ./docker-compose.yml up -d"
command = "docker compose -f ./docker-compose.yml down && docker compose -f ./docker-compose.yml up -d"
when = create
}
}
Expand All @@ -19,17 +19,17 @@ resource "null_resource" "docker_compose_down" {
}

provisioner "local-exec" {
command = "docker-compose -f ./docker-compose.yml down"
command = "docker compose -f ./docker-compose.yml down"
when = destroy
}
}

resource "local_file" "setup_environment_file" {
filename = "local_environment_setup.sh"
content = <<EOF
export TEST_REDIS_HOST=localhost &&\
export TEST_REDIS_PORT=6379 &&\
export TEST_REDIS_USERNAME=us4rn4m3 &&\
export TEST_REDIS_PASSWORD=user-pa55w0rd
content = <<EOF
export TEST_REDIS_HOST=localhost
export TEST_REDIS_PORT=6379
export TEST_REDIS_USERNAME=default
export TEST_REDIS_PASSWORD=default-pa55w0rd
EOF
}
3 changes: 0 additions & 3 deletions redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ func (c *RedisDB) DeleteUser(ctx context.Context, req dbplugin.DeleteUserRequest
var response string

err = db.Do(ctx, radix.Cmd(&response, "ACL", "DELUSER", req.Username))

if err != nil {
return dbplugin.DeleteUserResponse{}, err
}
Expand All @@ -149,7 +148,6 @@ func newUser(ctx context.Context, db radix.Client, username string, req dbplugin
var response string

err = db.Do(ctx, radix.Cmd(&response, "ACL", aclargs...))

if err != nil {
return err
}
Expand Down Expand Up @@ -192,7 +190,6 @@ func (c *RedisDB) changeUserPassword(ctx context.Context, username, password str

var sresponse string
err = db.Do(ctx, radix.Cmd(&sresponse, "ACL", "SETUSER", username, "RESETPASS", ">"+password))

if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ func testRedisDBInitialize_TLS(t *testing.T, host string, port int) {
"insecure_tls": true,
}
err = setupRedisDBInitialize(t, connectionDetails)

if err != nil {
t.Fatalf("Testing TLS Init() failed: error: %s", err)
}
Expand Down