Sha256: 9bc074ddaef4be86bbcc749011a9896f6c83f53f341f361de45b68c37b01b81a
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
require 'helper' require 'kvm/rice_release' require 'kvm/rice_release_generated_dataset' class TestRiceRelease < KVM::KVMTest def test_rice_release_existence assert !KVM::RiceRelease.new(fake_project).exists? real_project = create_project p real_project assert KVM::RiceRelease.new(real_project).exists? end def test_rice_release_name_format assert_raises(RuntimeError) do KVM::RiceRelease.new("project1-version1").exists? end end def test_list projects = [] 5.times do projects << create_project end project_list = KVM::RiceRelease.list assert_equal 5, project_list.length assert array_contains_values(project_list.map { |i| i.name }, projects) end def test_datasets project_name = fake_project ds_list = [] 5.times do ds_list << create_src_dataset(project_name) end p ds_list ds_names = ds_list.map { |d| d[1] } p ds_names release = KVM::RiceRelease.new(project_name) dataset_dirs = release.dataset_dirs p dataset_dirs assert_equal ds_list.length, dataset_dirs.length assert array_contains_values(dataset_dirs, ds_names) datasets = release.dataset_dirs assert_equal ds_list.length, datasets.length assert array_contains_values(datasets, ds_names) end def test_extract release = KVM::RiceRelease.new(TEST_RICE_VERSION) assert !release.exists? release.get assert KVM::Archive.new(TEST_RICE_VERSION).exists? assert release.exists? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kvm-0.0.1.pre | test/test_rice_release.rb |