Copilot commented on code in PR #13137:
URL: https://github.com/apache/cloudstack/pull/13137#discussion_r3264517296


##########
test/integration/plugins/solidfire/__init__.py:
##########
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.

Review Comment:
   Adding an `__init__.py` here makes `test/integration/plugins/solidfire` a 
top-level Python package named `solidfire` when the plugins directory is on 
`sys.path` (common when running these tests with nose/unittest discovery). The 
SolidFire tests in this directory import the external SolidFire SDK via `from 
solidfire.factory import ElementFactory`, which will then resolve to this local 
test package instead and fail because it has no `factory` module. To avoid 
breaking the SolidFire tests, don’t turn this directory into a top-level 
`solidfire` package (e.g., remove this `__init__.py`, or adjust the test runner 
so tests are imported under a non-conflicting package namespace such as 
`test.integration.plugins.solidfire`).
   



##########
test/integration/plugins/storpool/__init__.py:
##########
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the

Review Comment:
   Adding an `__init__.py` here makes `test/integration/plugins/storpool` 
importable as a top-level `storpool` package when running tests from 
`test/integration/plugins` (or directly from this directory). The StorPool 
tests in this folder import the external StorPool client (`from storpool import 
spapi, sptypes`), which will then resolve to this local test package instead 
and fail because `spapi/sptypes` aren’t present here. Consider removing this 
`__init__.py` (and only packaging subdirs that truly need relative imports), or 
running/discovering tests from a higher-level package namespace so the local 
module becomes `...plugins.storpool` rather than `storpool`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to