Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test VM in GIT repository

I have a project which uses TCP/IP communication to communicate with a server.
For my project, i have setup a server in a VM which i use for my tests.
When i run my tests, the VM starts, my tests run, and the VM will be closed after the test run.

Because my VM belongs to my project-resources, i want to add it to my repository.
There is only one problem, my VM is 6.5 GB and i have a GIT repository.

GIT always notes: Do not store big files in the repository. And i do want to avoid this.

How should i arrange this in my project?
Should i store the VM elsewhere? (And retrieve it when i need it)
Or do I have other options?

like image 827
Mats Stijlaart Avatar asked Nov 28 '11 11:11

Mats Stijlaart


People also ask

What is test in Git?

git-test is a command-line script for running automated tests against commits in a Git repository. It is especially targeted at developers who like their tests to pass on every commit in a branch, not just the branch tip.

How do I connect to a Git bash VM?

Now open Git Bash and enter ssh connection command — ssh username@DNSLabel — now enter user's password, you'll connected to VM. Got questions?


2 Answers

Store it elsewhere. Test machines are part of the environment, like compilers or external libraries, and not part of the source. Thus, they don't belong into the source control system.

For very project-specific files, a common pattern is to store an URI identifying the machine (e.g. using rsync://) and a checksum in the git and let your build system fetch the machine.

like image 131
thiton Avatar answered Sep 30 '22 13:09

thiton


As others have said, adding the VM to your repository is a Bad Idea. You may want to consider looking at something like Vagrant which allows you to set up VMs via VirtualBox but you only need to store the scripts necessary to boot up the VM how you want it.

like image 31
richsage Avatar answered Sep 30 '22 13:09

richsage