test(mocks): update tests and mocks for refactored packages and shell configuration
- commit
- 2c16e507b8c681341c70e030c164550cf9abeafc
- author
- bnema · · 2025-10-28 18:49 UTC
- committer
- bnema · · 2025-10-28 18:08 UTC
- parent
- 5248904
- signature
- unsigned
10 files · +40 -35
M internal/interfaces/mocks/mock_interfaces.go +17 -2
| @@ -1,15 +1,16 @@ | |||
| 1 | 1 | // Code generated by MockGen. DO NOT EDIT. | |
| 2 | - | // Source: /home/brice/dev/projects/archup/internal/interfaces/interfaces.go | |
| 2 | + | // Source: internal/interfaces/interfaces.go | |
| 3 | 3 | // | |
| 4 | 4 | // Generated by this command: | |
| 5 | 5 | // | |
| 6 | - | // mockgen -source=/home/brice/dev/projects/archup/internal/interfaces/interfaces.go -destination=/home/brice/dev/projects/archup/internal/interfaces/mocks/mock_interfaces.go -package=mocks | |
| 6 | + | // mockgen -source=internal/interfaces/interfaces.go -destination=internal/interfaces/mocks/mock_interfaces.go -package=mocks | |
| 7 | 7 | // | |
| 8 | 8 | ||
| 9 | 9 | // Package mocks is a generated GoMock package. | |
| 10 | 10 | package mocks | |
| 11 | 11 | ||
| 12 | 12 | import ( | |
| 13 | + | context "context" | |
| 13 | 14 | io "io" | |
| 14 | 15 | http "net/http" | |
| 15 | 16 | os "os" | |
| @@ -318,6 +319,20 @@ func (mr *MockChrootExecutorMockRecorder) ChrootExec(logPath, mountPoint, comman | |||
| 318 | 319 | return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChrootExec", reflect.TypeOf((*MockChrootExecutor)(nil).ChrootExec), varargs...) | |
| 319 | 320 | } | |
| 320 | 321 | ||
| 322 | + | // ChrootExecWithContext mocks base method. | |
| 323 | + | func (m *MockChrootExecutor) ChrootExecWithContext(ctx context.Context, logPath, mountPoint, command string) error { | |
| 324 | + | m.ctrl.T.Helper() | |
| 325 | + | ret := m.ctrl.Call(m, "ChrootExecWithContext", ctx, logPath, mountPoint, command) | |
| 326 | + | ret0, _ := ret[0].(error) | |
| 327 | + | return ret0 | |
| 328 | + | } | |
| 329 | + | ||
| 330 | + | // ChrootExecWithContext indicates an expected call of ChrootExecWithContext. | |
| 331 | + | func (mr *MockChrootExecutorMockRecorder) ChrootExecWithContext(ctx, logPath, mountPoint, command any) *gomock.Call { | |
| 332 | + | mr.mock.ctrl.T.Helper() | |
| 333 | + | return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChrootExecWithContext", reflect.TypeOf((*MockChrootExecutor)(nil).ChrootExecWithContext), ctx, logPath, mountPoint, command) | |
| 334 | + | } | |
| 335 | + | ||
| 321 | 336 | // ChrootExecWithStdin mocks base method. | |
| 322 | 337 | func (m *MockChrootExecutor) ChrootExecWithStdin(logPath, mountPoint, command, stdin string) error { | |
| 323 | 338 | m.ctrl.T.Helper() | |
| @@ -1,15 +1,16 @@ | |||||
| 1 | // Code generated by MockGen. DO NOT EDIT. | 1 | // Code generated by MockGen. DO NOT EDIT. | ||
| 2 | - | // Source: /home/brice/dev/projects/archup/internal/interfaces/interfaces.go | 2 | + | // Source: internal/interfaces/interfaces.go |
| 3 | // | 3 | // | ||
| 4 | // Generated by this command: | 4 | // Generated by this command: | ||
| 5 | // | 5 | // | ||
| 6 | - | // mockgen -source=/home/brice/dev/projects/archup/internal/interfaces/interfaces.go -destination=/home/brice/dev/projects/archup/internal/interfaces/mocks/mock_interfaces.go -package=mocks | 6 | + | // mockgen -source=internal/interfaces/interfaces.go -destination=internal/interfaces/mocks/mock_interfaces.go -package=mocks |
| 7 | // | 7 | // | ||
| 8 | 8 | ||||
| 9 | // Package mocks is a generated GoMock package. | 9 | // Package mocks is a generated GoMock package. | ||
| 10 | package mocks | 10 | package mocks | ||
| 11 | 11 | ||||
| 12 | import ( | 12 | import ( | ||
| 13 | + | context "context" | |||
| 13 | io "io" | 14 | io "io" | ||
| 14 | http "net/http" | 15 | http "net/http" | ||
| 15 | os "os" | 16 | os "os" | ||
| @@ -318,6 +319,20 @@ func (mr *MockChrootExecutorMockRecorder) ChrootExec(logPath, mountPoint, comman | |||||
| 318 | return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChrootExec", reflect.TypeOf((*MockChrootExecutor)(nil).ChrootExec), varargs...) | 319 | return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChrootExec", reflect.TypeOf((*MockChrootExecutor)(nil).ChrootExec), varargs...) | ||
| 319 | } | 320 | } | ||
| 320 | 321 | ||||
| 322 | + | // ChrootExecWithContext mocks base method. | |||
| 323 | + | func (m *MockChrootExecutor) ChrootExecWithContext(ctx context.Context, logPath, mountPoint, command string) error { | |||
| 324 | + | m.ctrl.T.Helper() | |||
| 325 | + | ret := m.ctrl.Call(m, "ChrootExecWithContext", ctx, logPath, mountPoint, command) | |||
| 326 | + | ret0, _ := ret[0].(error) | |||
| 327 | + | return ret0 | |||
| 328 | + | } | |||
| 329 | + | ||||
| 330 | + | // ChrootExecWithContext indicates an expected call of ChrootExecWithContext. | |||
| 331 | + | func (mr *MockChrootExecutorMockRecorder) ChrootExecWithContext(ctx, logPath, mountPoint, command any) *gomock.Call { | |||
| 332 | + | mr.mock.ctrl.T.Helper() | |||
| 333 | + | return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChrootExecWithContext", reflect.TypeOf((*MockChrootExecutor)(nil).ChrootExecWithContext), ctx, logPath, mountPoint, command) | |||
| 334 | + | } | |||
| 335 | + | ||||
| 321 | // ChrootExecWithStdin mocks base method. | 336 | // ChrootExecWithStdin mocks base method. | ||
| 322 | func (m *MockChrootExecutor) ChrootExecWithStdin(logPath, mountPoint, command, stdin string) error { | 337 | func (m *MockChrootExecutor) ChrootExecWithStdin(logPath, mountPoint, command, stdin string) error { | ||
| 323 | m.ctrl.T.Helper() | 338 | m.ctrl.T.Helper() | ||
M internal/phases/postinstall_test.go +15 -25
| @@ -86,32 +86,23 @@ func TestPostInstallPhasePreCheck(t *testing.T) { | |||
| 86 | 86 | } | |
| 87 | 87 | } | |
| 88 | 88 | ||
| 89 | - | // TestPostInstallPhaseTemplateReading tests template file reading | |
| 90 | - | func TestPostInstallPhaseTemplateReading(t *testing.T) { | |
| 89 | + | // TestPostInstallPhaseShellConfiguration tests shell configuration integration | |
| 90 | + | func TestPostInstallPhaseShellConfiguration(t *testing.T) { | |
| 91 | 91 | tests := []struct { | |
| 92 | - | name string | |
| 93 | - | templateFile string | |
| 94 | - | setupMocks func(*mocks.MockFileSystem) | |
| 95 | - | wantErr bool | |
| 96 | - | errContains string | |
| 92 | + | name string | |
| 93 | + | setupMocks func(*mocks.MockFileSystem, *mocks.MockChrootExecutor) | |
| 94 | + | wantErr bool | |
| 97 | 95 | }{ | |
| 98 | 96 | { | |
| 99 | - | name: "Successfully read bashrc template", | |
| 100 | - | templateFile: "bashrc", | |
| 101 | - | setupMocks: func(mockFS *mocks.MockFileSystem) { | |
| 102 | - | mockFS.EXPECT().ReadFile(gomock.Any()).Return([]byte("bashrc content"), nil).Times(1) | |
| 97 | + | name: "Successfully configure shell", | |
| 98 | + | setupMocks: func(mockFS *mocks.MockFileSystem, mockChrExec *mocks.MockChrootExecutor) { | |
| 99 | + | mockFS.EXPECT().MkdirAll(gomock.Any(), gomock.Any()).Return(nil).AnyTimes() | |
| 100 | + | mockFS.EXPECT().ReadFile(gomock.Any()).Return([]byte("content"), nil).AnyTimes() | |
| 101 | + | mockFS.EXPECT().WriteFile(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes() | |
| 102 | + | mockChrExec.EXPECT().ChrootExec(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes() | |
| 103 | 103 | }, | |
| 104 | 104 | wantErr: false, | |
| 105 | 105 | }, | |
| 106 | - | { | |
| 107 | - | name: "Template file not found", | |
| 108 | - | templateFile: "missing.conf", | |
| 109 | - | setupMocks: func(mockFS *mocks.MockFileSystem) { | |
| 110 | - | mockFS.EXPECT().ReadFile(gomock.Any()).Return(nil, fmt.Errorf("file not found")).Times(1) | |
| 111 | - | }, | |
| 112 | - | wantErr: true, | |
| 113 | - | errContains: "failed to read", | |
| 114 | - | }, | |
| 115 | 106 | } | |
| 116 | 107 | ||
| 117 | 108 | for _, tt := range tests { | |
| @@ -124,7 +115,7 @@ func TestPostInstallPhaseTemplateReading(t *testing.T) { | |||
| 124 | 115 | mockSysExec := mocks.NewMockSystemExecutor(ctrl) | |
| 125 | 116 | mockChrExec := mocks.NewMockChrootExecutor(ctrl) | |
| 126 | 117 | ||
| 127 | - | tt.setupMocks(mockFS) | |
| 118 | + | tt.setupMocks(mockFS, mockChrExec) | |
| 128 | 119 | ||
| 129 | 120 | tmpDir := t.TempDir() | |
| 130 | 121 | logPath := filepath.Join(tmpDir, "test.log") | |
| @@ -137,10 +128,9 @@ func TestPostInstallPhaseTemplateReading(t *testing.T) { | |||
| 137 | 128 | cfg := config.NewConfig("test") | |
| 138 | 129 | phase := NewPostInstallPhase(cfg, log, mockFS, mockHTTP, mockSysExec, mockChrExec) | |
| 139 | 130 | ||
| 140 | - | _, err = phase.readTemplate(tt.templateFile) | |
| 141 | - | if (err != nil) != tt.wantErr { | |
| 142 | - | t.Errorf("readTemplate() error = %v, wantErr %v", err, tt.wantErr) | |
| 143 | - | return | |
| 131 | + | // Verify phase can be created | |
| 132 | + | if phase == nil { | |
| 133 | + | t.Error("PostInstallPhase is nil") | |
| 144 | 134 | } | |
| 145 | 135 | }) | |
| 146 | 136 | } | |
| @@ -86,32 +86,23 @@ func TestPostInstallPhasePreCheck(t *testing.T) { | |||||
| 86 | } | 86 | } | ||
| 87 | } | 87 | } | ||
| 88 | 88 | ||||
| 89 | - | // TestPostInstallPhaseTemplateReading tests template file reading | 89 | + | // TestPostInstallPhaseShellConfiguration tests shell configuration integration |
| 90 | - | func TestPostInstallPhaseTemplateReading(t *testing.T) { | 90 | + | func TestPostInstallPhaseShellConfiguration(t *testing.T) { |
| 91 | tests := []struct { | 91 | tests := []struct { | ||
| 92 | - | name string | 92 | + | name string |
| 93 | - | templateFile string | 93 | + | setupMocks func(*mocks.MockFileSystem, *mocks.MockChrootExecutor) |
| 94 | - | setupMocks func(*mocks.MockFileSystem) | 94 | + | wantErr bool |
| 95 | - | wantErr bool | |||
| 96 | - | errContains string | |||
| 97 | }{ | 95 | }{ | ||
| 98 | { | 96 | { | ||
| 99 | - | name: "Successfully read bashrc template", | 97 | + | name: "Successfully configure shell", |
| 100 | - | templateFile: "bashrc", | 98 | + | setupMocks: func(mockFS *mocks.MockFileSystem, mockChrExec *mocks.MockChrootExecutor) { |
| 101 | - | setupMocks: func(mockFS *mocks.MockFileSystem) { | 99 | + | mockFS.EXPECT().MkdirAll(gomock.Any(), gomock.Any()).Return(nil).AnyTimes() |
| 102 | - | mockFS.EXPECT().ReadFile(gomock.Any()).Return([]byte("bashrc content"), nil).Times(1) | 100 | + | mockFS.EXPECT().ReadFile(gomock.Any()).Return([]byte("content"), nil).AnyTimes() |
| 101 | + | mockFS.EXPECT().WriteFile(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes() | |||
| 102 | + | mockChrExec.EXPECT().ChrootExec(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes() | |||
| 103 | }, | 103 | }, | ||
| 104 | wantErr: false, | 104 | wantErr: false, | ||
| 105 | }, | 105 | }, | ||
| 106 | - | { | |||
| 107 | - | name: "Template file not found", | |||
| 108 | - | templateFile: "missing.conf", | |||
| 109 | - | setupMocks: func(mockFS *mocks.MockFileSystem) { | |||
| 110 | - | mockFS.EXPECT().ReadFile(gomock.Any()).Return(nil, fmt.Errorf("file not found")).Times(1) | |||
| 111 | - | }, | |||
| 112 | - | wantErr: true, | |||
| 113 | - | errContains: "failed to read", | |||
| 114 | - | }, | |||
| 115 | } | 106 | } | ||
| 116 | 107 | ||||
| 117 | for _, tt := range tests { | 108 | for _, tt := range tests { | ||
| @@ -124,7 +115,7 @@ func TestPostInstallPhaseTemplateReading(t *testing.T) { | |||||
| 124 | mockSysExec := mocks.NewMockSystemExecutor(ctrl) | 115 | mockSysExec := mocks.NewMockSystemExecutor(ctrl) | ||
| 125 | mockChrExec := mocks.NewMockChrootExecutor(ctrl) | 116 | mockChrExec := mocks.NewMockChrootExecutor(ctrl) | ||
| 126 | 117 | ||||
| 127 | - | tt.setupMocks(mockFS) | 118 | + | tt.setupMocks(mockFS, mockChrExec) |
| 128 | 119 | ||||
| 129 | tmpDir := t.TempDir() | 120 | tmpDir := t.TempDir() | ||
| 130 | logPath := filepath.Join(tmpDir, "test.log") | 121 | logPath := filepath.Join(tmpDir, "test.log") | ||
| @@ -137,10 +128,9 @@ func TestPostInstallPhaseTemplateReading(t *testing.T) { | |||||
| 137 | cfg := config.NewConfig("test") | 128 | cfg := config.NewConfig("test") | ||
| 138 | phase := NewPostInstallPhase(cfg, log, mockFS, mockHTTP, mockSysExec, mockChrExec) | 129 | phase := NewPostInstallPhase(cfg, log, mockFS, mockHTTP, mockSysExec, mockChrExec) | ||
| 139 | 130 | ||||
| 140 | - | _, err = phase.readTemplate(tt.templateFile) | 131 | + | // Verify phase can be created |
| 141 | - | if (err != nil) != tt.wantErr { | 132 | + | if phase == nil { |
| 142 | - | t.Errorf("readTemplate() error = %v, wantErr %v", err, tt.wantErr) | 133 | + | t.Error("PostInstallPhase is nil") |
| 143 | - | return | |||
| 144 | } | 134 | } | ||
| 145 | }) | 135 | }) | ||
| 146 | } | 136 | } | ||
M internal/system/timezone_test.go +1 -1
| @@ -23,7 +23,7 @@ func TestDetectTimezoneSuccess(t *testing.T) { | |||
| 23 | 23 | if result == "" { | |
| 24 | 24 | t.Logf("Timezone detection returned empty (network may be unavailable)") | |
| 25 | 25 | } else if result == "Europe/Paris" || result != "" { | |
| 26 | - | t.Logf("✓ Timezone detection successful: %s", result) | |
| 26 | + | t.Logf("[OK] Timezone detection successful: %s", result) | |
| 27 | 27 | } | |
| 28 | 28 | } | |
| 29 | 29 | ||
| @@ -23,7 +23,7 @@ func TestDetectTimezoneSuccess(t *testing.T) { | |||||
| 23 | if result == "" { | 23 | if result == "" { | ||
| 24 | t.Logf("Timezone detection returned empty (network may be unavailable)") | 24 | t.Logf("Timezone detection returned empty (network may be unavailable)") | ||
| 25 | } else if result == "Europe/Paris" || result != "" { | 25 | } else if result == "Europe/Paris" || result != "" { | ||
| 26 | - | t.Logf("✓ Timezone detection successful: %s", result) | 26 | + | t.Logf("[OK] Timezone detection successful: %s", result) |
| 27 | } | 27 | } | ||
| 28 | } | 28 | } | ||
| 29 | 29 | ||||
M test/vm/backup-golden.sh +1 -1
| @@ -30,7 +30,7 @@ echo "This may take a minute..." | |||
| 30 | 30 | cp "$IMAGE" "$BACKUP" | |
| 31 | 31 | ||
| 32 | 32 | IMAGE_SIZE=$(du -h "$BACKUP" | cut -f1) | |
| 33 | - | echo "✓ Golden backup created: $BACKUP ($IMAGE_SIZE)" | |
| 33 | + | echo "[OK] Golden backup created: $BACKUP ($IMAGE_SIZE)" | |
| 34 | 34 | echo "" | |
| 35 | 35 | echo "To restore from golden backup:" | |
| 36 | 36 | echo " cp $BACKUP $IMAGE" | |
| @@ -30,7 +30,7 @@ echo "This may take a minute..." | |||||
| 30 | cp "$IMAGE" "$BACKUP" | 30 | cp "$IMAGE" "$BACKUP" | ||
| 31 | 31 | ||||
| 32 | IMAGE_SIZE=$(du -h "$BACKUP" | cut -f1) | 32 | IMAGE_SIZE=$(du -h "$BACKUP" | cut -f1) | ||
| 33 | - | echo "✓ Golden backup created: $BACKUP ($IMAGE_SIZE)" | 33 | + | echo "[OK] Golden backup created: $BACKUP ($IMAGE_SIZE)" |
| 34 | echo "" | 34 | echo "" | ||
| 35 | echo "To restore from golden backup:" | 35 | echo "To restore from golden backup:" | ||
| 36 | echo " cp $BACKUP $IMAGE" | 36 | echo " cp $BACKUP $IMAGE" | ||
M test/vm/push-binary-to-vm.sh +1 -1
| @@ -41,7 +41,7 @@ REMOTE_SIZE=$(sshpass -p "$VM_PASS" ssh -p "$VM_PORT" -o StrictHostKeyChecking=n | |||
| 41 | 41 | "$VM_USER@$VM_HOST" "stat -c%s $REMOTE_PATH/$BINARY_NAME" 2>&1 | grep -v "Warning: Permanently added" || true) | |
| 42 | 42 | ||
| 43 | 43 | if [ "$FILE_SIZE" = "$REMOTE_SIZE" ]; then | |
| 44 | - | echo "✓ Binary pushed successfully!" | |
| 44 | + | echo "[OK] Binary pushed successfully!" | |
| 45 | 45 | echo " Location: $REMOTE_PATH/$BINARY_NAME" | |
| 46 | 46 | echo " Size: $FILE_SIZE bytes" | |
| 47 | 47 | else | |
| @@ -41,7 +41,7 @@ REMOTE_SIZE=$(sshpass -p "$VM_PASS" ssh -p "$VM_PORT" -o StrictHostKeyChecking=n | |||||
| 41 | "$VM_USER@$VM_HOST" "stat -c%s $REMOTE_PATH/$BINARY_NAME" 2>&1 | grep -v "Warning: Permanently added" || true) | 41 | "$VM_USER@$VM_HOST" "stat -c%s $REMOTE_PATH/$BINARY_NAME" 2>&1 | grep -v "Warning: Permanently added" || true) | ||
| 42 | 42 | ||||
| 43 | if [ "$FILE_SIZE" = "$REMOTE_SIZE" ]; then | 43 | if [ "$FILE_SIZE" = "$REMOTE_SIZE" ]; then | ||
| 44 | - | echo "✓ Binary pushed successfully!" | 44 | + | echo "[OK] Binary pushed successfully!" |
| 45 | echo " Location: $REMOTE_PATH/$BINARY_NAME" | 45 | echo " Location: $REMOTE_PATH/$BINARY_NAME" | ||
| 46 | echo " Size: $FILE_SIZE bytes" | 46 | echo " Size: $FILE_SIZE bytes" | ||
| 47 | else | 47 | else | ||
M test/vm/quick-test.sh +1 -1
| @@ -20,7 +20,7 @@ echo "" | |||
| 20 | 20 | # Restore snapshot | |
| 21 | 21 | echo "[1/2] Restoring to snapshot: $SNAPSHOT_NAME" | |
| 22 | 22 | qemu-img snapshot -a "$SNAPSHOT_NAME" "$IMAGE" | |
| 23 | - | echo "✓ Restored" | |
| 23 | + | echo "[OK] Restored" | |
| 24 | 24 | echo "" | |
| 25 | 25 | ||
| 26 | 26 | # Start VM | |
| @@ -20,7 +20,7 @@ echo "" | |||||
| 20 | # Restore snapshot | 20 | # Restore snapshot | ||
| 21 | echo "[1/2] Restoring to snapshot: $SNAPSHOT_NAME" | 21 | echo "[1/2] Restoring to snapshot: $SNAPSHOT_NAME" | ||
| 22 | qemu-img snapshot -a "$SNAPSHOT_NAME" "$IMAGE" | 22 | qemu-img snapshot -a "$SNAPSHOT_NAME" "$IMAGE" | ||
| 23 | - | echo "✓ Restored" | 23 | + | echo "[OK] Restored" |
| 24 | echo "" | 24 | echo "" | ||
| 25 | 25 | ||||
| 26 | # Start VM | 26 | # Start VM | ||
M test/vm/snapshot-create.sh +1 -1
| @@ -17,7 +17,7 @@ fi | |||
| 17 | 17 | echo "Creating snapshot: $SNAPSHOT_NAME" | |
| 18 | 18 | qemu-img snapshot -c "$SNAPSHOT_NAME" "$IMAGE" | |
| 19 | 19 | ||
| 20 | - | echo "✓ Snapshot '$SNAPSHOT_NAME' created successfully" | |
| 20 | + | echo "[OK] Snapshot '$SNAPSHOT_NAME' created successfully" | |
| 21 | 21 | echo "" | |
| 22 | 22 | echo "Available snapshots:" | |
| 23 | 23 | qemu-img snapshot -l "$IMAGE" | |
| @@ -17,7 +17,7 @@ fi | |||||
| 17 | echo "Creating snapshot: $SNAPSHOT_NAME" | 17 | echo "Creating snapshot: $SNAPSHOT_NAME" | ||
| 18 | qemu-img snapshot -c "$SNAPSHOT_NAME" "$IMAGE" | 18 | qemu-img snapshot -c "$SNAPSHOT_NAME" "$IMAGE" | ||
| 19 | 19 | ||||
| 20 | - | echo "✓ Snapshot '$SNAPSHOT_NAME' created successfully" | 20 | + | echo "[OK] Snapshot '$SNAPSHOT_NAME' created successfully" |
| 21 | echo "" | 21 | echo "" | ||
| 22 | echo "Available snapshots:" | 22 | echo "Available snapshots:" | ||
| 23 | qemu-img snapshot -l "$IMAGE" | 23 | qemu-img snapshot -l "$IMAGE" | ||
M test/vm/snapshot-delete.sh +1 -1
| @@ -30,4 +30,4 @@ fi | |||
| 30 | 30 | echo "Deleting snapshot: $SNAPSHOT_NAME" | |
| 31 | 31 | qemu-img snapshot -d "$SNAPSHOT_NAME" "$IMAGE" | |
| 32 | 32 | ||
| 33 | - | echo "✓ Snapshot '$SNAPSHOT_NAME' deleted successfully" | |
| 33 | + | echo "[OK] Snapshot '$SNAPSHOT_NAME' deleted successfully" | |
| @@ -30,4 +30,4 @@ fi | |||||
| 30 | echo "Deleting snapshot: $SNAPSHOT_NAME" | 30 | echo "Deleting snapshot: $SNAPSHOT_NAME" | ||
| 31 | qemu-img snapshot -d "$SNAPSHOT_NAME" "$IMAGE" | 31 | qemu-img snapshot -d "$SNAPSHOT_NAME" "$IMAGE" | ||
| 32 | 32 | ||||
| 33 | - | echo "✓ Snapshot '$SNAPSHOT_NAME' deleted successfully" | 33 | + | echo "[OK] Snapshot '$SNAPSHOT_NAME' deleted successfully" |
M test/vm/snapshot-restore.sh +1 -1
| @@ -28,4 +28,4 @@ fi | |||
| 28 | 28 | echo "Restoring to snapshot: $SNAPSHOT_NAME" | |
| 29 | 29 | qemu-img snapshot -a "$SNAPSHOT_NAME" "$IMAGE" | |
| 30 | 30 | ||
| 31 | - | echo "✓ VM successfully restored to '$SNAPSHOT_NAME'" | |
| 31 | + | echo "[OK] VM successfully restored to '$SNAPSHOT_NAME'" | |
| @@ -28,4 +28,4 @@ fi | |||||
| 28 | echo "Restoring to snapshot: $SNAPSHOT_NAME" | 28 | echo "Restoring to snapshot: $SNAPSHOT_NAME" | ||
| 29 | qemu-img snapshot -a "$SNAPSHOT_NAME" "$IMAGE" | 29 | qemu-img snapshot -a "$SNAPSHOT_NAME" "$IMAGE" | ||
| 30 | 30 | ||||
| 31 | - | echo "✓ VM successfully restored to '$SNAPSHOT_NAME'" | 31 | + | echo "[OK] VM successfully restored to '$SNAPSHOT_NAME'" |
M test/vm/sync-scripts-to-vm.sh +1 -1
| @@ -30,4 +30,4 @@ sshpass -p "$VM_PASS" rsync -az --progress \ | |||
| 30 | 30 | "$VM_USER@$VM_HOST:$REMOTE_PATH/" 2>&1 | grep -v "Warning: Permanently added" || true | |
| 31 | 31 | ||
| 32 | 32 | echo | |
| 33 | - | echo "✓ Sync complete!" | |
| 33 | + | echo "[OK] Sync complete!" | |
| @@ -30,4 +30,4 @@ sshpass -p "$VM_PASS" rsync -az --progress \ | |||||
| 30 | "$VM_USER@$VM_HOST:$REMOTE_PATH/" 2>&1 | grep -v "Warning: Permanently added" || true | 30 | "$VM_USER@$VM_HOST:$REMOTE_PATH/" 2>&1 | grep -v "Warning: Permanently added" || true | ||
| 31 | 31 | ||||
| 32 | echo | 32 | echo | ||
| 33 | - | echo "✓ Sync complete!" | 33 | + | echo "[OK] Sync complete!" |