diff --git a/spec/fixture/config.json b/spec/fixture/config.json deleted file mode 100644 index f1461221..00000000 --- a/spec/fixture/config.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "vm": { - "hostname": "teracy.dev", - "box": "bento/ubuntu-16.04", - "box_version": "", - "networks": [{ // see: http://docs.vagrantup.com/v2/networking/index.html - "_id": "0", - "mode": "public_network", // one of "forwarded_port", "private_network" or "public_network" - //by default, 192.168.99.100 is used for Boot2Docker - // for convention, use 192.168.99.101 for teracy-dev, 192.168.99.102 for teracy-staging, etc. - //"ip": "" // for private_network, public_network mode - //"type":"dhcp", // for private_network mode; if ip and type are both defined, ip takes precedence - //"auto_config":true, // for private_network mode + ip - "bridge": [ - "eth0", //wired LAN, the first priority - "en0: Wi-Fi (AirPort)", // macOS 10.12 - "en1: Wi-Fi (AirPort)", // macOS 10.11 - "wlan0" // linux - ] // for public_network mode - }], - "synced_folders":[{ //see: http://docs.vagrantup.com/v2/synced-folders/index.html - "_id": "0", - "type": "virtual_box", - "host": ".", - "guest": "/vagrant", - "disabled": true - }, { - "_id": "1", - "type": "rsync", - "host": "./workspace", - "guest": "/home/vagrant/workspace", - "rsync__exclude": [".git", ".idea/", "node_modules/", "bower_components/", ".npm/"] - }, { // should persist docker auth token after login success #170 - "_id": "2", - "type": "virtual_box", - "host": "./home/.docker", - "guest": "/home/vagrant/.docker", - "mount_options": [ - "dmode=775", - "fmode=755" - ] - // { - // "type":"virtual_box", // virtual_box, "nfs", "rsync" or "smb", incase smb mount failed, - // // ssh to vm and install cifs-utils allow vm mount smb directory - // // mount.cifs needs to be used with dir_mode file_mode instead of dmode fmode - // // Windows 7 needs powershell 3.0 to create smb share on windows - // // http://www.microsoft.com/en-us/download/details.aspx?id=34595 - // "host":"./docker", - // "guest":"/var/lib/docker/", - // "mount_options":[ - // "dmode=775", - // "fmode=755" - // ] - // }, - //TODO: how to keep and reused existing Docker images after destroying the VM? - // or even attaching the existing data into it, so that developers should share the Docker images - // remove /vagrant default file sync on the VM guest machine #184 - }] - // Other configs - // "boot_timeout": 300, - // "box_check_update": true, - // "box_download_checksum": "", - // "box_download_checksum_type": "", // "md5", "sha1", "sha256" - // "box_download_client_cert": "", - // "box_download_ca_cert": "", - // "box_download_ca_path": "", - // "box_download_insecure": true, // true, false - // "communicator": "ssh", // ssh, winrm - // "graceful_halt_timeout": 60, - // "guest": "linux", // linux - // "hostname": "", - // "post_up_message": "", - // "usable_port_range": "2200..2250" // 2200..2250 - }, - "vb": { //virtualbox settings from https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm - //"gui":true, - //"name":"teracy-dev", - "memory": 1024, - //"cpus":1, - "description": "teracy-dev #{Time.now.getutc.to_i}" - }, - "provisioners": [{ - "_id": "0", - "type": "chef_solo", - "log_level": "info", //one of debug, info, warn, error, fatal. Default: info - "cookbooks_path": [ - "vendor-cookbooks", - "main-cookbooks" - ], - "roles_path": "roles", - "nodes_path": "nodes", - "data_bags_path": "data_bags", - "run_list": [ - "vim", - "teracy-dev" - ], - "json": { - // we mix teracy-dev config along with vender-cookbooks config, hopefully this is better than - // separated as we did before, this is for advanded users only - "docker": { - "enabled": true, - "version": "", // use this to install a specific docker version, default: "" - // used along with the version key, this is default for Ubuntu - "package_options": "--force-yes -o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-all'", - "repo": "main", // one of main, test, experimental, default: "main" - "members": ["vagrant"], // to append this member to "docker" group - "action": "create" // one of create, delete. Default: create - }, - "docker_compose": { - "release": "1.10.0", // more: https://github.com/docker/compose/releases/ - "enabled": true // "docker" must be enabled to get this - }, - "docker_machine": { - "enabled": false, - "release": "v0.8.2" // more: https://github.com/docker/machine/releases/ - }, - "teracy-dev": { - "directories": [{ - "_id": "0", - "path": "/home/vagrant/workspace", - "owner": "vagrant", - "group": "vagrant", - "mode": "0775", - "action": "create" // one of create, delete, nothing. Default: create. - // See more: https://docs.chef.io/resource_directory.html - }], - "alias": [{ - "_id": "0", - "name": "ws", - "command": "cd ~/workspace", - "action": "add" // one of add, remove. Default: add. - // See more: https://github.com/customink-webops/magic_shell/blob/master/resources/alias.rb - }], - "env": [{ - "_id": "0", - "key": "EDITOR", - "value": "vim", - "action": "add" // one of add, remove. Default: add. - // See more: https://github.com/customink-webops/magic_shell/blob/master/resources/environment.rb - }], - "inotify": { - "max_user_watches": 524288 // see: https://github.com/teracyhq/dev/issues/208, set value = 0 to unset this setting - } - } - } - }], - "plugins": [{ - "_id": "0", - "name": "vagrant-gatling-rsync", - "config_key": "gatling", - "required": true, - // auto rsync watch when up/ reload done - // should try to reduce rsync latency to 0.5s instead of 1s #173 - "latency": 0.5, //0.5s - "time_format": "%H:%M:%S", - "rsync_on_startup": true - }, { - "_id": "1", - "name": "vagrant-rsync-back", - "required": true - }] -} diff --git a/spec/fixture/config_override.json b/spec/fixture/config_override.json deleted file mode 100644 index 880cd61f..00000000 --- a/spec/fixture/config_override.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vm":{ - "synced_folders":[{ //see: http://docs.vagrantup.com/v2/synced-folders/index.html - "_id": "0", - "_op": "d" - }, { - "_id": "1", - "_op": "d" - } - ] - } -} \ No newline at end of file diff --git a/spec/fixture/org_project.json b/spec/fixture/org_project.json deleted file mode 100644 index d491c736..00000000 --- a/spec/fixture/org_project.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "vm": { - "networks": [{ - "_id": "0", - "bridge": [ - // If it asks for your network interface, add it the right network interface here - // to choose it by default, you don't have to choose again when $ vagrant reload - // note that if you choose the inactive network interface, problems could happen - // then uncomment the line below and $ vagrant reload to select the right one - //"en0: Wi-Fi (AirPort)" - ] - }] - }, - "vagrant": { - "config_paths": [ - "workspace/angular-hello-world/vagrant_config.default.json", - "workspace/nextjs-hello-world/vagrant_config.default.json" - ] - }, - "vb": { - "memory": 2048, // need to adjust for the right optimal MEM - "cpus": 2 - }, - "provisioners": [{ - "_id": "0", - "_a_cookbooks_path": [ - "workspace/dev-setup/chef/main-cookbooks" - ], - "_ua_run_list": [ - "vim", - "teracy-dev", - "acme" - ], - "json": { - "teracy-dev": { - "aliases": [ { - "name": "http", // `$ http` to make http requests, how to use: https://github.com/teracyhq/httpie-jwt-auth - "command": "docker container run -it --rm --net=host teracy/httpie-jwt-auth:latest-alpine", - "action": "add" - }], - "proxy": { - "container": { - "enabled": true - } - } - } - } - }] -} diff --git a/spec/fixture/project1.json b/spec/fixture/project1.json deleted file mode 100644 index 63833358..00000000 --- a/spec/fixture/project1.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "vm": { - "synced_folders":[{ - "_id": "100", - "type": "rsync", - "host": "./workspace/angular-hello-world", - "guest": "/home/vagrant/workspace/angular-hello-world", - "rsync__exclude": [".git", ".idea/", "node_modules/", "bower_components/", ".npm/"] - }, { - "_id": "100", - "type": "virtual_box", - "host": "workspace/angular-hello-world/node_modules", - "guest": "/home/vagrant/workspace/angular-hello-world/node_modules", - "mount_options": [ - "dmode=775", - "fmode=755" - ] - }, { - // enable this to sync /dist back and forth to the host automatically - "_id": "101", - "type": "virtual_box", - "host": "workspace/angular-hello-world/dist", - "guest": "/home/vagrant/workspace/angular-hello-world/dist", - "mount_options": [ - "dmode=775", - "fmode=755" - ] - }] - }, - - "provisioners": [{ - "_id": "0", - "_a_cookbooks_path": [ - "workspace/angular-hello-world/dev-setup/chef/main-cookbooks" - ], - "_ua_run_list": [ - "angular-hello-world" - ], - "json": { - "teracy-dev": { - "aliases": [ { - "_id": "100", - "name": "ahw", // `$ ahw` to cd right into the angular-hello-world project - "command": "cd ~/workspace/angular-hello-world", - "action": "add" - }] - }, - "acme": { - "angular-hello-world": { - "project_guest_path": "/home/vagrant/workspace/angular-hello-world" - } - } - } - }], - "plugins": [{ - "_id": "2", - "options": { - "_ua_aliases": [ - "dev.ahw.acme.dev", "review.ahw.acme.dev", "ahw.acme.dev" - ] - } - }] -} diff --git a/spec/fixture/project2.json b/spec/fixture/project2.json deleted file mode 100644 index 83a235bf..00000000 --- a/spec/fixture/project2.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "vm": { - "synced_folders":[{ - "_id": "200", - "type": "rsync", - "host": "./workspace/nextjs-hello-world", - "guest": "/home/vagrant/workspace/nextjs-hello-world", - "rsync__exclude": [".git", ".idea/", "node_modules/", "bower_components/", ".npm/"] - }, { - "id": "201", - "type": "virtual_box", - "host": "workspace/nextjs-hello-world/node_modules", - "guest": "/home/vagrant/workspace/nextjs-hello-world/node_modules", - "mount_options": [ - "dmode=775", - "fmode=755" - ] - }, { // enable this to sync /.next back and forth to the host automatically - "id": "202", - "type": "virtual_box", - "host": "workspace/nextjs-hello-world/.next", - "guest": "/home/vagrant/workspace/nextjs-hello-world/.next", - "mount_options": [ - "dmode=775", - "fmode=755" - ] - }] - }, - "provisioners": [{ - "_id": "0", - "_a_cookbooks_path": [ - "workspace/nextjs-hello-world/dev-setup/chef/main-cookbooks" - ], - "_ua_run_list": [ - "nextjs-hello-world" - ], - "json": { - "teracy-dev": { - "aliases": [ { - "_id": "200", - "name": "nhw", // `$ nhw` to cd right into the nextjs-hello-world project - "command": "cd ~/workspace/nextjs-hello-world", - "action": "add" - }] - }, - "acme": { - "nextjs-hello-world": { - "project_guest_path": "/home/vagrant/workspace/nextjs-hello-world" - } - } - } - }], - "plugins": [{ - "_id": "2", - "options": { - "_ua_aliases": [ - "dev.nextjs.acme.dev", "review.nextjs.acme.dev", "nextjs.acme.dev" - ] - } - }] -} diff --git a/spec/utility_spec.rb b/spec/utility_spec.rb deleted file mode 100644 index af49dc06..00000000 --- a/spec/utility_spec.rb +++ /dev/null @@ -1,424 +0,0 @@ -require 'json' -require "./lib/utility" - -#TODO: add this case -# first = {"default"=>{"provisioners"=>nil}} -# second = {"default"=>{"provisioners"=>[{"_id"=>"dev-setup-0", "verbose"=>"v", "type"=>"ansible_local", "playbook"=>"workspace/dev-setup/ansible/playbook.yml"}]}} - -describe "utility" do - describe "overrides" do - context "given an empty obj2" do - it "returns the same obj1" do - obj1 = { - "msg" => "hello" - } - new_obj = overrides(obj1, {}) - expect(new_obj).to eql(obj1) - end - end - - context "given a simple obj2" do - it "returns the new obj" do - obj1 = { - "msg"=> "hello" - } - new_obj = overrides(obj1, {"a"=> "b"}) - expect(new_obj).to eql({ - "msg"=> "hello", - "a"=> "b" - }) - end - end - - context "given a simple override obj2" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "vm" => { - "box_version" => "1.2.3" - }, - "vb" => { - "memory" => 2048 - } - } - new_obj = overrides(obj1, obj2) - # puts new_obj - expect(new_obj['vm']['box_version']).to eql('1.2.3') - expect(new_obj['vb']['memory']).to eql(2048) - end - end - - context "given a simple obj2 to append by default index" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "plugins" => [{ - "_id" => "2", - "name" => "my-plugin", - "required" => true - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(3) - expect(new_plugins[2]).to eql(obj2['plugins'][0]) - end - end - - context "given a simple obj2 to append by specified index" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "plugins" => [{ - "_id" => "2", - "_idx" => 0, - "name" => "my-plugin", - "required" => true - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(3) - expect(new_plugins[0]).to eql(obj2['plugins'][0]) - end - end - - context "given a deep level obj2 to append by default index" do - it "returns the new overriden obj" do - obj1 = { - "provisioners" => [{ - "_id" => "0", - "type" => "chef_solo", - "json" => { - "teracy-dev" => { - "directories" => [{ - "_id" => "0", - "path" => "/home/vagrant/workspace", - "owner" => "vagrant", - "group" => "vagrant", - "mode" => "0775", - "action" => "create" - }, { - "_id" => "1", - "path" => "/home/vagrant/test", - "owner" => "vagrant", - "group" => "vagrant", - "mode" => "0775", - "action" => "create" - }] - } - } - }] - } - obj2 = { - "provisioners" => [{ - "_id" => "0", - "json" => { - "teracy-dev" => { - "directories" => [{ - "_id": "2", - "path" => "/home/vagrant/test2" - }] - } - } - }] - } - new_obj = overrides(obj1, obj2) - new_directories = new_obj['provisioners'][0]['json']['teracy-dev']['directories'] - expect(new_directories.length).to eql(3) - expect(new_directories[2]).to eql(obj2['provisioners'][0]['json']['teracy-dev']['directories'][0]) - end - end - - context "given a deep level obj2 to append by specified index" do - it "returns the new overriden obj" do - obj1 = { - "provisioners" => [{ - "_id" => "0", - "type" => "chef_solo", - "json" => { - "teracy-dev" => { - "directories" => [{ - "_id" => "0", - "path" => "/home/vagrant/workspace", - "owner" => "vagrant", - "group" => "vagrant", - "mode" => "0775", - "action" => "create" - }, { - "_id" => "1", - "path" => "/home/vagrant/test", - "owner" => "vagrant", - "group" => "vagrant", - "mode" => "0775", - "action" => "create" - }] - } - } - }] - } - obj2 = { - "provisioners" => [{ - "_id" => "0", - "json" => { - "teracy-dev" => { - "directories" => [{ - "_id": "2", - "_idx" => 1, - "path" => "/home/vagrant/test2" - }] - } - } - }] - } - new_obj = overrides(obj1, obj2) - new_directories = new_obj['provisioners'][0]['json']['teracy-dev']['directories'] - expect(new_directories.length).to eql(3) - expect(new_directories[1]).to eql(obj2['provisioners'][0]['json']['teracy-dev']['directories'][0]) - end - end - - context "given a simple obj2 to override by default" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "plugins" => [{ - "_id" => "0", - "rsync_on_startup" => false - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(2) - expect(new_plugins[0]['rsync_on_startup']).to eql(false) - end - end - - context "given a simple obj2 to override by _op='o'" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "plugins" => [{ - "_id" => "0", - "_op" => 'o', - "rsync_on_startup" => false - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(2) - expect(new_plugins[0]['rsync_on_startup']).to eql(false) - end - end - - context "given a simple obj2 to override by _op='r'" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "plugins" => [{ - "_id" => "0", - "_op" => 'r', - "rsync_on_startup" => false - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(2) - expect(new_plugins[0]).to eql(obj2['plugins'][0]) - end - end - - context "given a simple obj2 to override by _op='d'" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "plugins" => [{ - "_id" => "0", - "_op" => 'd' - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(1) - expect(new_plugins[0]).to eql({ - "_id" => "1", - "name" => "vagrant-rsync-back", - "required" => true - }) - end - end - - context "given a simple obj2 to replace existing array" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "_r_plugins" => [{ - "_id" => "0", - "name" => "my-plugin", - "required" => true - }] - } - new_plugins = overrides(obj1, obj2)['plugins'] - expect(new_plugins.length).to eql(1) - expect(new_plugins).to eql(obj2['_r_plugins']) - end - end - - context "given a simple obj2 to replace existing text array" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "provisioners" => [{ - "_id" => "0", - "run_list" => [ - "my", - "new", - "run-list" - ] - }] - } - new_provisioners = overrides(obj1, obj2)['provisioners'] - # puts new_provisioners - expect(new_provisioners[0]['run_list']).to eql(obj2['provisioners'][0]['run_list']) - end - end - - context "given a simple obj2 to replace existing text array with an empty array" do - it "returns the new overriden obj" do - obj1 = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - obj2 = { - "provisioners" => [{ - "_id" => "0", - "run_list" => [] - }] - } - new_provisioners = overrides(obj1, obj2)['provisioners'] - # puts new_provisioners - expect(new_provisioners[0]['run_list']).to eql(obj2['provisioners'][0]['run_list']) - end - end - context "given an object then override it with another object containing an array" do - it "all array name in new and old array must be normalized" do - obj1 = {} - obj2 = { - "provisioners" => [{ - "_id" => "0", - "_a_run_list" => [] - }] - } - new_provisioners = overrides(obj1, obj2)['provisioners'] - expect(new_provisioners[0]['run_list']).to eql(obj2['provisioners'][0]['_a_run_list']) - end - it "all array name in new and old array must be normalized and value must be appended" do - obj1 = {} - obj2 = { - "provisioners" => [{ - "_id" => "0", - "_a_run_list" => ["vagrant", "vim", "teracy"] - }] - } - new_provisioners = overrides(obj1, obj2)['provisioners'] - expect(new_provisioners[0]['run_list']).to eql(obj2['provisioners'][0]['_a_run_list']) - end - it "all array name in new and old array must be normalized and value must be appended" do - obj1 = { - "provisioners" => [{ - "_id" => "0", - "_a_run_list" => ["vagrant", "vim", "helloworld"] - }] - } - obj2 = { - "provisioners" => [{ - "_id" => "0", - "_a_run_list" => ["vagrant", "vim", "teracy"] - }] - } - new_provisioners = overrides(obj1, obj2)['provisioners'] - expect(new_provisioners[0]['run_list']).to eql(["vagrant", "vim", "helloworld", "vagrant", "vim", "teracy"]) - end - end - - context "given two objects then unique override it with another object contain array" do - it "all array name in new and old array must be normalized and valued must be merged" do - obj1 = { - "provisioners" => [{ - "_id" => "0", - "_ua_run_list" => ["vim", "teracy", "widget", "testsuite"] - }] - } - - obj2 = { - "provisioners" => [{ - "_id" => "0", - "_ua_run_list" => ["vagrant", "vim", "teracy"] - }] - } - obj1_origin = obj1.clone - - new_provisioners = overrides(obj1, obj2)['provisioners'] - expect(new_provisioners[0]['run_list']).to eql(["vim", "teracy", "widget", "testsuite", "vagrant"]) - end - it "all array name in new and old array must be normalized and value must be merged" do - obj1 = { - "provisioners" => [{ - "_id" => "0", - "run_list" => ["vim", "teracy", "widget", "testsuite"] - }] - } - - obj2 = { - "provisioners" => [{ - "_id" => "0", - "_ua_run_list" => ["vagrant", "vim", "teracy"] - }] - } - obj1_origin = obj1.clone - - new_provisioners = overrides(obj1, obj2)['provisioners'] - expect(new_provisioners[0]['run_list']).to eql(["vim", "teracy", "widget", "testsuite", "vagrant"]) - end - it "all array name in new and old array must be normalize" do - obj1 = {} - obj2 = { - "provisioners" => [{ - "_id" => "0", - "_a_run_list" => ["hi", "there"] - }] - } - new_provisioners = overrides(obj1, obj2)['provisioners'] - - expect(new_provisioners[0]['run_list']).to eql(obj2['provisioners'][0]['_a_run_list']) - end - end - - context "Giving many config file follow project base config requirement" do - it "after override the config must satisfy the requirement" do - teracy_default_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - teracy_override_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config_override.json')) - project_org_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/org_project.json')) - project1_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/project1.json')) - project2_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/project2.json')) - - origin_teracy_default_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config.json')) - origin_teracy_override_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/config_override.json')) - origin_project_org_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/org_project.json')) - origin_project1_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/project1.json')) - origin_project2_config = JSON.parse(File.read(File.dirname(__FILE__) + '/fixture/project2.json')) - - final_config = overrides(teracy_default_config, teracy_override_config) - final_config = overrides(final_config, project_org_config) - final_config = overrides(final_config, project1_config) - final_config = overrides(final_config, project2_config) - - expect(final_config['vm']['synced_folders'].length).to eql(origin_teracy_default_config['vm']['synced_folders'].length - 2 + - origin_project1_config['vm']['synced_folders'].length + - origin_project2_config['vm']['synced_folders'].length) - - expect(final_config['vm']['synced_folders'][6]['guest']).to eql(origin_project2_config['vm']['synced_folders'][2]['guest']) - expect(final_config['vm']['synced_folders'][6]['host']).to eql(origin_project2_config['vm']['synced_folders'][2]['host']) - expect(final_config['vm']['synced_folders'][6]['id']).to eql(origin_project2_config['vm']['synced_folders'][2]['id']) - - expect(final_config['vm']['synced_folders'][6]['guest']).to eql(origin_project2_config['vm']['synced_folders'][2]['guest']) - expect(final_config['vm']['synced_folders'][6]['host']).to eql(origin_project2_config['vm']['synced_folders'][2]['host']) - expect(final_config['vm']['synced_folders'][6]['id']).to eql(origin_project2_config['vm']['synced_folders'][2]['id']) - - expect(final_config['plugins'][2]['options']['aliases'].length).to eql(origin_project1_config['plugins'][0]['options']['_ua_aliases'].length + - origin_project2_config['plugins'][0]['options']['_ua_aliases'].length) - end - end - end -end