Skip to content

Fix hostname in Apple configuration profile - #19704

Merged
rullzer merged 2 commits into
nextcloud:masterfrom
Nils160988:master
Mar 9, 2020
Merged

Fix hostname in Apple configuration profile#19704
rullzer merged 2 commits into
nextcloud:masterfrom
Nils160988:master

Conversation

@Nils160988

Copy link
Copy Markdown
Contributor

Closes#19656

Signed-off-by: Nils Wittenbrink nilswittenbrink@web.de

Signed-off-by: Nils Wittenbrink <nilswittenbrink@web.de>
@kesselb

Copy link
Copy Markdown
Contributor
Index: apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php	(revision 90c3e3bbeb566f73952f7e4c66b9f98ec84cdde2)
+++ apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php	(date 1582992422173)
@@ -158,10 +158,9 @@
->method('getServerProtocol')
->wilLReturn('https');
- $this->sabreRequest->expects($this->at(1))
- ->method('getAbsoluteUrl')
- ->with()
- ->willReturn('https://nextcloud.tld/nextcloud/remote.php/dav/provisioning/apple-provisioning.mobileconfig');
+ $this->urlGenerator->expects($this->once())
+ ->method('getBaseUrl')
+ ->willReturn('https://nextcloud.tld/nextcloud');
$this->themingDefaults->expects($this->at(0))
->method('getName')

One test fails due the other method used to get the url. Above patch should mock getBaseUrl properly.

@kesselbkesselb added 2. developing Work in progress bug labels Feb 29, 2020
@kesselbkesselb added this to the Nextcloud 19 milestone Feb 29, 2020
Signed-off-by: Nils Wittenbrink <nilswittenbrink@web.de>
@Nils160988

Copy link
Copy Markdown
ContributorAuthor

Fixed the test as @kesselb suggested

@kesselbkesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 29, 2020
@kesselb
kesselb requested a review from rullzerFebruary 29, 2020 21:27
@georgehrke

Copy link
Copy Markdown
Member

@Nils160988 Thx for the contribution!

@rullzer
rullzer merged commit 0d613cd into nextcloud:masterMar 9, 2020
@welcome

welcomeBot commented Mar 9, 2020

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
Most developers hang out on IRC. So join #nextcloud-dev on Freenode for a chat!

@Nils160988

Copy link
Copy Markdown
ContributorAuthor

Thanks for merging :)
Backport to 18? Should not be a critical change I think

@georgehrke

Copy link
Copy Markdown
Member

/backport to stable18

@georgehrke

Copy link
Copy Markdown
Member

/backport to stable17

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable18 in #19884

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable17 in #19885

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration profile for macOS/iOS contains internal server ip and does not respect overwritehost

4 participants

@Nils160988@kesselb@georgehrke@rullzer