Skip to content

Commit

Permalink
Fix upgrade version[specific ci=11-01-Upgrade] (#4072)
Browse files Browse the repository at this point in the history
* fix upgrade version issue

* test upgraded version

* fix upgrade case log collection issue

* add timeout into old version install
  • Loading branch information
emlin authored Mar 2, 2017
1 parent cb4eff3 commit 7c6af2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/install/validate/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ func (v *Validator) ValidateMigratedConfig(ctx context.Context, conf *config.Vir
v.assertTarget(conf)
v.assertDatastore(conf)
v.assertNetwork(conf)
if err := v.ListIssues(); err != nil {
return conf, err
}
return v.migrateData(ctx, conf)
}

return conf, v.ListIssues()
func (v *Validator) migrateData(ctx context.Context, conf *config.VirtualContainerHostConfigSpec) (*config.VirtualContainerHostConfigSpec, error) {
conf.Version = version.GetBuild()
return conf, nil
}

func (v *Validator) assertNetwork(conf *config.VirtualContainerHostConfigSpec) {
Expand Down
5 changes: 5 additions & 0 deletions tests/test-cases/Group11-Upgrade/11-01-Upgrade.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Install VIC with version to Test Server
Log To Console \nDownloading vic ${version} from bintray...
${rc} ${output}= Run And Return Rc And Output wget https://bintray.com/vmware/vic-repo/download_file?file_path=vic_${version}.tar.gz -O vic.tar.gz
${rc} ${output}= Run And Return Rc And Output tar zxvf vic.tar.gz
Set Environment Variable TEST_TIMEOUT 20m0s
Install VIC Appliance To Test Server vic-machine=./vic/vic-machine-linux appliance-iso=./vic/appliance.iso bootstrap-iso=./vic/bootstrap.iso certs=${false}
Set Environment Variable VIC-ADMIN %{VCH-IP}:2378

Clean up VIC Appliance And Local Binary
Cleanup VIC Appliance On Test Server
Expand Down Expand Up @@ -61,8 +63,11 @@ Upgrade VCH with containers
Should Not Contain ${output} Rolling back upgrade
Should Be Equal As Integers ${rc} 0

${rc} ${output}= Run And Return Rc And Output bin/vic-machine-linux version
@{vers}= Split String ${output}
${rc} ${output}= Run And Return Rc And Output bin/vic-machine-linux inspect --name=%{VCH-NAME} --target=%{TEST_URL} --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --password=%{TEST_PASSWORD} --compute-resource=%{TEST_RESOURCE}
Should Contain ${output} Completed successfully
Should Contain ${output} @{vers}[2]
Should Be Equal As Integers ${rc} 0
Log ${output}
Get Docker Params ${output} ${true}
Expand Down

0 comments on commit 7c6af2a

Please sign in to comment.