Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Add Integration tests #181

Merged
merged 10 commits into from
May 8, 2018

Conversation

chingor13
Copy link
Member

@chingor13 chingor13 commented May 2, 2018

Adds an integration test to Circle CI

  • Runs memcache and mysql servers for tests
  • Generates and tests a wordpress instance
  • Generates and tests a laravel instance (with Eloquent using mysql)

Note: to test the current branch, we replace the repo/branch in the composer.json before installing dependencies.

See #120


public function testCurlExec()
{
$url = 'https://www.google.com/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in here we could avoid this Google dependency. Would you consider to use something like https://github.com/jcchavezs/httptest-php

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that would work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll skip this for now: jcchavezs/httptest-php#5

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chingor13 I just opened a PR addressing this issue: jcchavezs/httptest-php#6

@chingor13 chingor13 force-pushed the integration-tests branch from af9892a to d291506 Compare May 4, 2018 19:22
@chingor13 chingor13 requested a review from tmatsuo May 4, 2018 19:23
@chingor13 chingor13 changed the title WIP: Integration tests Add Integration tests May 4, 2018
@@ -77,12 +77,9 @@ public static function load()
});

// public function delete()
opencensus_trace_method(Model::class, 'delete', function ($model, $query) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was broken and caught by integration tests - there is no parameter for query.

@@ -0,0 +1,3 @@
<?php

require __DIR__ . '/../vendor/autoload.php';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the only content, maybe you can just specify the autoload.php in the phpunit config file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -0,0 +1,3 @@
<?php

require_once __DIR__ . '/../vendor/autoload.php';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

chingor13 added 9 commits May 7, 2018 10:14

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Add wordpress example/integration test

run integration test in circle ci

specify mysql:5.7 and only run integrations for now

Skip batcache for wordpress

Add memcached test

Move wordpress test to integration, run memcached test

Fix memcached extension loading. Wait for mysql container

Fix php version for memcached test

Parameterize memcache composer url

Fix sed

Fix composer branch

Fix mysql start

Put wp-config in correct location

Add laravel integration test

Fix laravel network, run migrations

Fix database migration command

Install pdo/pdo_mysql extensions

Pass db credentials as env vars

Fix docker run argument order

Add eloquent database tests

Try memcached test without docker

Install memcached extension without prompts

Fix test script name

Combine laravel and wordpress tests into single integration test

Ignore return code for file copy. Fix wordpress db config

Cleanup missing vars

Run curl tests in integrations

Add guzzle5/6 tests

Re-enable unit tests

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@chingor13 chingor13 force-pushed the integration-tests branch from a75184b to 598a548 Compare May 7, 2018 17:14

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@chingor13 chingor13 merged commit 2e3e731 into census-instrumentation:master May 8, 2018
@chingor13 chingor13 deleted the integration-tests branch May 8, 2018 18:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants