Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] Run PHP tests with 7.4-ubuntu20.04 #40006

Closed
wants to merge 3 commits into from

Conversation

phil-davis
Copy link
Contributor

Description

WIP - replaces PR #39460

Related Issue

#38348

How Has This Been Tested?

CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@phil-davis
Copy link
Contributor Author

phil-davis commented Apr 22, 2022

https://drone.owncloud.com/owncloud/core/35399/13/9
caldav and carddav tests need python:

+ bash apps/dav/tests/ci/caldav/script.sh
[Fri Apr 22 08:23:19 2022] PHP 7.4.27 Development Server (http://127.0.0.1:8889) started
apps/dav/tests/ci/caldav/script.sh: line 12: python: command not found
{"reqId":"hS5yL3ZkIXQS5zAuDRlZ","level":3,"time":"2022-04-22T08:23:05+00:00","remoteAddr":"","user":"--","app":"mysql.setup","method":"--","url":"--","message":"Specific user creation failed: An exception occurred while executing 'SELECT user FROM mysql.user WHERE user=?' with params [\"oc_admin\"]:\n\nSQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'owncloud'@'192.168.13.3' for table 'user'"}

and some database problem

Edit: I specified python2 and caldav and carddav tests are passing.

@phil-davis phil-davis force-pushed the php-ubuntu20.04-202204 branch 2 times, most recently from 5c9da51 to 55862c2 Compare May 5, 2022 09:55
@phil-davis
Copy link
Contributor Author

PHP unit test fails: https://drone.owncloud.com/owncloud/core/35632/9/8

There were 4 failures:

1) Test\LargeFileHelperGetFileSizeTest::testGetFileSizeViaCurl with data set #0 ('/drone/src/tests/data/lorem.txt', 446)
Failed asserting that null is identical to 446.

/drone/src/tests/lib/LargeFileHelperGetFileSizeTest.php:53

2) Test\LargeFileHelperGetFileSizeTest::testGetFileSizeViaCurl with data set #1 ('/drone/src/tests/data/strängé...2).txt', 446)
Failed asserting that null is identical to 446.

/drone/src/tests/lib/LargeFileHelperGetFileSizeTest.php:53

3) Tests\Core\Templates\TemplatesTest::test403
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\n
-<html><body><ul><li class="error">\n
-		Access forbidden<br><p class="hint"></p>\n
-</li></ul></body></html>\n
+<html><body><ul>\n
+<li class="error">\n
+		Access forbidden<br>\n
+		<p class="hint"></p>\n
+	</li>\n
+</ul></body></html>\n
 '

/drone/src/tests/lib/TestCase.php:510
/drone/src/tests/lib/TestCase.php:488
/drone/src/tests/Core/Templates/TemplatesTest.php:9

4) Tests\Core\Templates\TemplatesTest::test404
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\n
-<html><body><ul><li class="error">\n
-			File not found<br><p class="hint">The specified document has not been found on the server.</p>\n
-<p class="hint"><a href="/owncloud/">You can click here to return to ownCloud.</a></p>\n
-		</li></ul></body></html>\n
+<html><body><ul>\n
+<li class="error">\n
+			File not found<br>\n
+			<p class="hint">The specified document has not been found on the server.</p>\n
+			<p class="hint"><a href="/owncloud/">You can click here to return to ownCloud.</a></p>\n
+		</li>\n
+	</ul></body></html>\n
 '

/drone/src/tests/lib/TestCase.php:510
/drone/src/tests/lib/TestCase.php:488
/drone/src/tests/Core/Templates/TemplatesTest.php:16
--

@phil-davis
Copy link
Contributor Author

Now we have only 2 failures:

There were 2 failures:

1) Test\LargeFileHelperGetFileSizeTest::testGetFileSizeViaCurl with data set #0 ('/drone/src/tests/data/lorem.txt', 446)
Failed asserting that null is identical to 446.

/drone/src/tests/lib/LargeFileHelperGetFileSizeTest.php:53

2) Test\LargeFileHelperGetFileSizeTest::testGetFileSizeViaCurl with data set #1 ('/drone/src/tests/data/strängé...2).txt', 446)
Failed asserting that null is identical to 446.

/drone/src/tests/lib/LargeFileHelperGetFileSizeTest.php:53
--

@phil-davis phil-davis force-pushed the php-ubuntu20.04-202204 branch from 8cac66d to 5ae33e4 Compare May 10, 2022 07:31
@phil-davis
Copy link
Contributor Author

That fixes all tests. There is just SonarCloud complaining about coverage. That will likely go away after much of these changes are merged to core for the existing Ubuntu 18.04 CI.

@phil-davis phil-davis force-pushed the php-ubuntu20.04-202204 branch 4 times, most recently from 496ceb5 to 14c3a16 Compare May 18, 2022 10:52
@owncloud owncloud deleted a comment from ownclouders May 18, 2022
@phil-davis phil-davis force-pushed the php-ubuntu20.04-202204 branch 4 times, most recently from a86c376 to 8dbac89 Compare May 25, 2022 14:08
@owncloud owncloud deleted a comment from ownclouders May 25, 2022
@phil-davis phil-davis force-pushed the php-ubuntu20.04-202204 branch from 8dbac89 to f52444c Compare June 2, 2022 15:37
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis
Copy link
Contributor Author

See #40147

@phil-davis phil-davis closed this Jun 17, 2022
@phil-davis phil-davis deleted the php-ubuntu20.04-202204 branch June 17, 2022 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant