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

adds log #1

Closed
wants to merge 9 commits into from
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
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
- "**/*.md"
- "docs/**"
push:
branches:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
Expand Down Expand Up @@ -128,4 +126,4 @@ jobs:
- name: Test Local Network Liveness
run: |
./contrib/scripts/test_localnet_liveness.sh 100 5 50 localhost
if: env.GIT_DIFF
if: env.GIT_DIFF
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ $(TEST_TARGETS): run-tests
run-tests:
ifneq (,$(shell which tparse 2>/dev/null))
@echo "--> Running tests"
@go test -mod=readonly -json $(ARGS) $(TEST_PACKAGES) | tparse
@go test -v -mod=readonly -json $(ARGS) $(TEST_PACKAGES) | tparse
else
@echo "--> Running tests"
@go test -mod=readonly $(ARGS) $(TEST_PACKAGES)
@go test -v -mod=readonly $(ARGS) $(TEST_PACKAGES)
endif

.PHONY: run-tests $(TEST_TARGETS)
Expand Down
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func (app *AtomOneApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) a
if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
// Print each entry in the map as a string
for key, value := range genesisState {
fmt.Printf("%s: %s\n", key, string(value))
}

app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())

Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/e2e_feegrant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func (s *IntegrationTestSuite) testFeeGrant() {
api = fmt.Sprintf("http://%s", s.valResources[c.id][valIdx].GetHostPort("1317/tcp"))
)

alice, _ := c.genesisAccounts[4].keyInfo.GetAddress()
bob, _ := c.genesisAccounts[5].keyInfo.GetAddress()
charlie, _ := c.genesisAccounts[6].keyInfo.GetAddress()
alice, _ := c.genesisAccounts[1].keyInfo.GetAddress()
bob, _ := c.genesisAccounts[2].keyInfo.GetAddress()
charlie, _ := c.genesisAccounts[3].keyInfo.GetAddress()

// add fee grant from alice to bob
s.execFeeGrant(
Expand Down
14 changes: 13 additions & 1 deletion tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (s *IntegrationTestSuite) initNodes(c *chain) {
c.genesisAccounts[2]: Test Account 1
c.genesisAccounts[3]: Test Account 2
*/
s.Require().NoError(c.addAccountFromMnemonic(7))
s.Require().NoError(c.addAccountFromMnemonic(5))
// Initialize a genesis file for the first validator
val0ConfigDir := c.validators[0].configDir()
var addrAll []sdk.AccAddress
Expand Down Expand Up @@ -541,6 +541,7 @@ func (s *IntegrationTestSuite) runValidators(c *chain, portOffset int) {
}
}

fmt.Println(fmt.Sprintf("%s:%s", runOpts.Repository, runOpts.Tag))
resource, err := s.dkrPool.RunWithOptions(runOpts, noRestart)
s.Require().NoError(err)

Expand All @@ -551,6 +552,17 @@ func (s *IntegrationTestSuite) runValidators(c *chain, portOffset int) {
rpcClient, err := rpchttp.New("tcp://localhost:26657", "/websocket")
s.Require().NoError(err)

defer func() {
err = s.dkrPool.Client.Logs(docker.LogsOptions{
Container: s.valResources[c.id][0].Container.ID,
OutputStream: os.Stdout,
ErrorStream: os.Stdout,
Stdout: true,
Stderr: true,
// Follow: true,
})
fmt.Println("ERR LOGS", err)
}()
s.Require().Eventually(
func() bool {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
Expand Down
Loading