Skip to content

Commit

Permalink
Update github pipeline
Browse files Browse the repository at this point in the history
- Add script, which run all needed feature tests
- Update filenames of feature tests, which are only for MySQL 8.0
- Rename variable in data.go for correctly linting
  • Loading branch information
WithSoull committed Dec 23, 2024
1 parent 08f8575 commit 81e03cd
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 55 deletions.
26 changes: 2 additions & 24 deletions .github/workflows/docker-tests-8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,8 @@ jobs:
strategy:
matrix:
command:
- 'VERSION=8.0 GODOG_FEATURE=active_nodes.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=async.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=async_setting.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=cascade_replicas.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=CLI.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=crash_recovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=events_reenable.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=external_replication.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=failover.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=free_space.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=host_discovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=host_management.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=maintenance.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=offline_mode.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=priority.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=readonly_filesystem.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=recovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=repair.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=repl_mon.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=statefile.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=switchover_from.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=switchover_to.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=zk_failure.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=zk_maintenance.feature make test'
- './tests/images/run_features_tests_for_8.0.sh'

fail-fast: false

steps:
Expand Down
23 changes: 1 addition & 22 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,7 @@ jobs:
strategy:
matrix:
command:
- 'GODOG_FEATURE=active_nodes.feature make test'
- 'GODOG_FEATURE=async.feature make test'
- 'GODOG_FEATURE=cascade_replicas.feature make test'
- 'GODOG_FEATURE=CLI.feature make test'
- 'GODOG_FEATURE=crash_recovery.feature make test'
- 'GODOG_FEATURE=events_reenable.feature make test'
- 'GODOG_FEATURE=failover.feature make test'
- 'GODOG_FEATURE=free_space.feature make test'
- 'GODOG_FEATURE=host_discovery.feature make test'
- 'GODOG_FEATURE=host_management.feature make test'
- 'GODOG_FEATURE=maintenance.feature make test'
- 'GODOG_FEATURE=offline_mode.feature make test'
- 'GODOG_FEATURE=priority.feature make test'
- 'GODOG_FEATURE=readonly_filesystem.feature make test'
- 'GODOG_FEATURE=recovery.feature make test'
- 'GODOG_FEATURE=repair.feature make test'
- 'GODOG_FEATURE=repl_mon.feature make test'
- 'GODOG_FEATURE=statefile.feature make test'
- 'GODOG_FEATURE=switchover_from.feature make test'
- 'GODOG_FEATURE=switchover_to.feature make test'
- 'GODOG_FEATURE=zk_failure.feature make test'
- 'GODOG_FEATURE=zk_maintenance.feature make test'
- './tests/images/run_features_tests_for_5.7.sh'
fail-fast: false

steps:
Expand Down
18 changes: 9 additions & 9 deletions internal/app/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ type SlaveState struct {
LastSQLErrno int `json:"last_sql_errno"`
}

func (ns *SlaveState) FromReplicaStatus(replStatus mysql.ReplicaStatus) {
ns.ExecutedGtidSet = replStatus.GetExecutedGtidSet()
ns.RetrievedGtidSet = replStatus.GetRetrievedGtidSet()
ns.MasterHost = replStatus.GetMasterHost()
ns.ReplicationState = replStatus.ReplicationState()
ns.MasterLogFile = replStatus.GetMasterLogFile()
ns.MasterLogPos = replStatus.GetReadMasterLogPos()
ns.LastIOErrno = replStatus.GetLastIOErrno()
ns.LastSQLErrno = replStatus.GetLastSQLErrno()
func (ss *SlaveState) FromReplicaStatus(replStatus mysql.ReplicaStatus) {
ss.ExecutedGtidSet = replStatus.GetExecutedGtidSet()
ss.RetrievedGtidSet = replStatus.GetRetrievedGtidSet()
ss.MasterHost = replStatus.GetMasterHost()
ss.ReplicationState = replStatus.ReplicationState()
ss.MasterLogFile = replStatus.GetMasterLogFile()
ss.MasterLogPos = replStatus.GetReadMasterLogPos()
ss.LastIOErrno = replStatus.GetLastIOErrno()
ss.LastSQLErrno = replStatus.GetLastSQLErrno()
}

// SemiSyncState contains semi sync host settings
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions tests/images/run_features_tests_for_5.7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash


for file in `find /tests/features/ -name "*.feature" -not -name "*8.0*"`; do
cd ../../
GODOG_FEATURE=$file make test
done
6 changes: 6 additions & 0 deletions tests/images/run_features_tests_for_8.0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

for file in `find ./tests/features/ -name "*.feature" -not -name "*5.7*"`; do
filename=$(basename "$file")
VERISON=8.0 GODOG_FEATURE=$filename make test
done

0 comments on commit 81e03cd

Please sign in to comment.