
205 Cal.App.3d 340 (1988)
252 Cal. Rptr. 214
THE PEOPLE, Plaintiff and Respondent,
v.
DAVID JOHN SHIMEK, Defendant and Appellant.
Docket No. C003269.
Court of Appeals of California, Third District.
October 21, 1988.
*341 COUNSEL
Carolyn Morris, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, Michael J. Weinberger and Thomas Y. Shigemoto, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
EVANS, Acting P.J.
Defendant pled guilty to cultivation of marijuana (Health & Saf. Code, § 11358) and was placed on probation. He contends his motion to suppress evidence should have been granted, and one of the conditions of his probation is invalid.[1] We shall affirm.

FACTS
On May 6, 1987, Officer Fritz of the Trinity County Sheriff Department was looking for a suspect in a domestic violence case, Frank Grunert, who was reportedly armed and under the influence of narcotics. He and other officers were sweeping the area of about five residences. Officer Fritz was checking the doors and windows, to make sure the suspect could not have entered the buildings. There were about three outbuildings in the area, one of which was defendant's greenhouse. Defendant's house was located about 75 feet from Grunert's house. Officer Fritz looked through a one-inch crack in the greenhouse, for the purpose of determining if the suspect was inside, and observed numerous growing marijuana plants. Later, he called his superior, who prepared an affidavit for a search warrant. The warrant was issued based on the affidavit. The greenhouse was searched on May 7, 1987, and approximately 239 growing marijuana plants were seized. The court ruled the observation was permissible, the affidavit accurate, and the ensuing search in good faith reliance on the warrant.[2]


*342 DISCUSSION

I[*]
.... .... .... .... .... .

II
Defendant was placed on probation with the condition, "He shall submit to urine, blood, or breath test for the detection of alcohol and/or narcotics when requested by the probation officer." Counsel acknowledges a probation condition is valid unless it has no relationship to the crime and relates to noncriminal conduct and is not reasonably related to future criminality. (People v. Lent (1975) 15 Cal.3d 481, 486 [124 Cal. Rptr. 905, 541 P.2d 545].) The condition imposed here assists the probation officer in determining if a defendant is violating the law. (See People v. Burton (1981) 117 Cal. App.3d 382, 390 [172 Cal. Rptr. 632, 19 A.L.R.4th 1243]; People v. Kern (1968) 264 Cal. App.2d 962, 965 [71 Cal. Rptr. 105].)
(1) Counsel contends Health and Safety Code section 11553 somehow prohibited the court from imposing the drug testing condition. That section provides in relevant part that "[t]he fact that a person is or has been, or is suspected of being, a user of marijuana is not alone sufficient grounds upon which to invoke Section 11551 or 11552." Section 11551, subdivision (a), of that code in turn provides that "[w]henever any court in this state grants probation to a person who the court has reason to believe is or has been a user of controlled substances, the court may require as a condition to probation that the probationer submit to periodic tests by a city or county health officer, or by a physician and surgeon appointed by the city or county health officer with the approval of the Attorney General, to determine, by whatever means is available, whether the probationer is addicted to a controlled substance."[4]
*343 These provisions do not avail defendant. First of all, the court did not order "periodic tests by a city or county health officer, or by a physician and surgeon" to determine whether "the probationer is addicted to a controlled substance" in violation of these statutes. Instead, it ordered testing by law enforcement officers to determine if defendant was violating the law and his probation. Secondly, and more importantly, the fact that defendant was a user of marijuana was not itself the reason for the condition. The condition was imposed because defendant was a convicted cultivator of marijuana who had apparently grown it for his own use in the past. Health and Safety Code section 11553 bars testing by health official doctors when the only ground for the testing is marijuana use. In essence, these sections are designed for testing of narcotic addicts and the restriction on testing marijuana users is a reflection of the Legislature's determination that such users are not narcotic addicts. These sections have nothing to do with the power of the court to test a convicted cultivator to determine if he is once again using in violation of the law and may also be cultivating again. Since the test condition was reasonably related to the crime of which defendant was convicted and since it did not violate the proscription of Health and Safety Code section 11553, the trial court was free to impose it.
The judgment is affirmed.
Blease, J., and Sims, J., concurred.
A petition for a rehearing was denied November 15, 1988, and appellant's petition for review by the Supreme Court was denied February 1, 1989.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of part I.
[1]  The Penal Code section 1538.5 motion was submitted on the transcript of the preliminary hearing, from which the facts are taken. The warrant and affidavit were received as evidence.
[2]  After concluding it could review the evidence de novo under Penal Code section 1538.5, subdivision (i), the court's written ruling states: "The defense argument concedes that Deputy Fritz was legitimately searching for a suspect in a criminal case when he was on the Shimek property on May 6, 1987. He evidently was checking out several different buildings in order to see if the suspect could be inside. During the course of this investigation he walked by a greenhouse and looked in through a one inch gap in the wall. Defense counsel accurately points out that Officer Fritz could have eliminated the greenhouse as a potential location of the suspect by simply checking to see if all the windows and doors were locked. In fact, he may not have had any strong reasons to suspect that the suspect was hiding inside the green-house. Nevertheless, the actual circumstances of his search for the suspect led him to be in a position where he made the observation through the greenhouse wall. It is a fairly close question, but I conclude that the observation which Fritz made of the contents of the greenhouse was constitutionally permissible. He did not enter the greenhouse, but rather relayed his information to Officer Grossman who later prepared an affidavit for a search warrant. The information from Fritz was accurately set forth in the affidavit for the warrant. The warrant was evidently executed in good faith; there is no evidence to the contrary."
[*]   See footnote, ante, page 340.
[4]  The other provision, Health and Safety Code section 11552, deals with tests performed on persons arrested for criminal offenses and has no relevance here.
