Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coolamqp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
coolamqp
Commits
3dcfc24c
Commit
3dcfc24c
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
integration tests
parent
97654619
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.travis.yml
+2
-0
2 additions, 0 deletions
.travis.yml
Vagrantfile
+25
-0
25 additions, 0 deletions
Vagrantfile
tests/__init__.py
+8
-0
8 additions, 0 deletions
tests/__init__.py
tests/test_cluster.py
+13
-0
13 additions, 0 deletions
tests/test_cluster.py
with
48 additions
and
0 deletions
.travis.yml
+
2
−
0
View file @
3dcfc24c
...
@@ -13,3 +13,5 @@ install:
...
@@ -13,3 +13,5 @@ install:
-
pip install -r requirements.txt
-
pip install -r requirements.txt
after_success
:
after_success
:
-
CODECLIMATE_REPO_TOKEN=e8e05973a6c49139de5f98013cd285f9238b78d20f053f37f6e7deeab2c2c52f codeclimate-test-reporter
-
CODECLIMATE_REPO_TOKEN=e8e05973a6c49139de5f98013cd285f9238b78d20f053f37f6e7deeab2c2c52f codeclimate-test-reporter
services
:
-
rabbitmq
This diff is collapsed.
Click to expand it.
Vagrantfile
0 → 100644
+
25
−
0
View file @
3dcfc24c
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant
.
configure
(
"2"
)
do
|
config
|
config
.
vm
.
box
=
"debian/contrib-jessie64"
config
.
vm
.
network
"forwarded_port"
,
guest:
15672
,
host:
15672
config
.
vm
.
provision
"shell"
,
inline:
<<-
SHELL
apt-get update
apt-get install -y htop curl python python-setuptools python-pip python-dev build-essential rabbitmq-server
pip install --upgrade pip setuptools
/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
service rabbitmq-server restart
rabbitmqctl add_user guest guest
rabbitmqctl set_permissions -p / guest ".*" ".*" ".*"
rabbitmqctl set_user_tags guest administrator
# Install deps
pip install -r /vagrant/requirements.txt
pip install nose
SHELL
end
This diff is collapsed.
Click to expand it.
tests/__init__.py
0 → 100644
+
8
−
0
View file @
3dcfc24c
"""
Fucking all tests are integration, because why fuck you.
How the fuck do you unit test a fucking NETWORK CLIENT LIBRARY?
Are you going to FUCKING MOCK AN ENTIRE AMQP BROKER? Fuck you.
You can run them either using fucking Travis CI or fucking Vagrant, it does not
fucking matter.
"""
This diff is collapsed.
Click to expand it.
tests/test_cluster.py
0 → 100644
+
13
−
0
View file @
3dcfc24c
#coding=UTF-8
from
__future__
import
absolute_import
,
division
,
print_function
import
unittest
from
coolamqp
import
Cluster
,
ClusterNode
class
MyTestCase
(
unittest
.
TestCase
):
def
test_connect
(
self
):
amqp
=
Cluster
([
ClusterNode
(
'
127.0.0.1
'
,
'
guest
'
,
'
guest
'
)])
amqp
.
start
()
amqp
.
shutdown
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment