Skip to content

Commit

Permalink
/{docs,modules}: pr feedback, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeegoddd committed Jan 31, 2024
1 parent f948998 commit c1fa127
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/modules/dolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ scripts to the container request, using the `WithScripts(scriptPaths ...string)`
the remote to clone, and use `WithDoltCredsPublicKey(key string)` along with `WithCredsFile(credsFile string)` to authorize the Dolt container to clone from the remote.

<!--codeinclude-->
[Example of Init script](../../modules/dolt/testdata/schema.sql)
[Example of Clone script](../../modules/dolt/testdata/clone-db.sh)
<!--/codeinclude-->

#### Custom configuration
Expand Down
2 changes: 0 additions & 2 deletions modules/dolt/dolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize
return nil, fmt.Errorf("empty password can be used only with the root user")
}

req.Env["SOME_BS"] = "wtfmaaaaaan"

container, err := testcontainers.GenericContainer(ctx, genericContainerReq)
if err != nil {
return nil, err
Expand Down
9 changes: 9 additions & 0 deletions modules/dolt/testdata/clone-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# use credentials for remote
if [ -n "$DOLT_CREDS_PUB_KEY" ]; then
dolt creds use "$DOLT_CREDS_PUB_KEY"
fi

# clone
dolt sql -q "CALL DOLT_CLONE('$DOLT_REMOTE_CLONE_URL', '$DOLT_DATABASE');"

0 comments on commit c1fa127

Please sign in to comment.