Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Fuchsia OS
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Hacrwang
Fuchsia OS
Commits
8c9e4f6f
Commit
8c9e4f6f
authored
6 years ago
by
Ankur Mittal
Committed by
CQ bot account: commit-bot@chromium.org
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[appmgr][test] Switch to new testing utility.
DX-387 #comment TEST=CQ Change-Id: I0fe34811ab118935ee4d0b3caeb87c9485fd5ad2
parent
ec205fa9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
garnet/bin/appmgr/namespace_unittest.cc
+5
-6
5 additions, 6 deletions
garnet/bin/appmgr/namespace_unittest.cc
with
5 additions
and
6 deletions
garnet/bin/appmgr/namespace_unittest.cc
+
5
−
6
View file @
8c9e4f6f
...
...
@@ -16,7 +16,7 @@
#include
<lib/fdio/fd.h>
#include
<lib/fdio/fdio.h>
#include
<lib/gtest/real_loop_fixture.h>
#include
<lib/sys/cpp/testing/service_directory_
for_test
.h>
#include
<lib/sys/cpp/testing/service_directory_
provider
.h>
#include
<lib/vfs/cpp/pseudo_dir.h>
#include
<lib/vfs/cpp/service.h>
#include
<lib/zx/channel.h>
...
...
@@ -78,8 +78,6 @@ class NamespaceHostDirectoryTest : public NamespaceTest {
class
NamespaceProviderTest
:
public
NamespaceTest
{
protected:
NamespaceProviderTest
()
:
provider_
(
sys
::
testing
::
ServiceDirectoryForTest
::
Create
())
{}
fxl
::
RefPtr
<
Namespace
>
MakeNamespace
(
ServiceListPtr
additional_services
)
{
return
fxl
::
MakeRefCounted
<
Namespace
>
(
nullptr
,
nullptr
,
std
::
move
(
additional_services
),
nullptr
);
...
...
@@ -90,11 +88,11 @@ class NamespaceProviderTest : public NamespaceTest {
[
this
,
name
](
fidl
::
InterfaceRequest
<
fuchsia
::
io
::
Node
>
request
)
{
++
connection_ctr_
[
name
];
};
provider_
->
AddService
(
std
::
move
(
cb
),
name
);
provider_
.
AddService
(
std
::
move
(
cb
),
name
);
return
ZX_OK
;
}
std
::
shared_ptr
<
sys
::
testing
::
ServiceDirectory
ForTest
>
provider_
;
sys
::
testing
::
ServiceDirectory
Provider
provider_
;
std
::
map
<
std
::
string
,
int
>
connection_ctr_
;
};
...
...
@@ -169,7 +167,8 @@ TEST_F(NamespaceProviderTest, AdditionalServices) {
EXPECT_EQ
(
ZX_OK
,
AddService
(
kService1
));
EXPECT_EQ
(
ZX_OK
,
AddService
(
kService2
));
service_list
->
host_directory
=
provider_
->
CloneChannel
().
TakeChannel
();
service_list
->
host_directory
=
provider_
.
service_directory
()
->
CloneChannel
().
TakeChannel
();
auto
ns
=
MakeNamespace
(
std
::
move
(
service_list
));
zx
::
channel
svc_dir
=
ns
->
OpenServicesAsDirectory
();
...
...
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